add non-regression test for issue 127052

This commit is contained in:
Rémy Rakic 2024-06-28 20:59:33 +00:00
parent 224cb3f638
commit 57931e5040

View file

@ -0,0 +1,9 @@
// This is a non-regression test for issue #127052 where unreferenced `#[used]` statics couldn't be
// removed by the MSVC linker, causing linking errors.
//@ build-pass: needs linking
//@ only-msvc
#[used]
static FOO: u32 = 0;
fn main() {}