1 // { dg-do compile { target i?86-pc-cygwin } }
2 // { dg-do compile { target i?86-pc-mingw* } }
4 // Check that selectany attribute puts symbols into link-once sections.
6 // { dg-final { scan-assembler "\.section\t\.data\\\$foo\[^\n\]*\n\t\.linkonce discard" } }
7 // { dg-final { scan-assembler "\.section\t\.data\\\$x\[^\n\]*\n\t\.linkonce discard" } }
8 // { dg-final { scan-assembler-dem "\nguard variable for x:" } }
10 __declspec (selectany) int foo = 1;
21 __declspec(selectany) X x(1);