1 // { dg-do compile { target i?86-pc-cygwin } }
2 // { dg-do compile { target i?86-pc-mingw* } }
4 // Check for errors with invalid usage of selectany attribute.
7 __declspec (selectany) int foo = 1; // OK
13 __declspec (selectany) int d::foo = 1; // OK
19 __declspec (selectany) struct f F= {1}; // OK
21 __declspec (selectany) int boo; //{ dg-error "selectany" }
23 __declspec (selectany) static int bar = 1; // { dg-error "selectany" }
24 int use_bar = bar; // Avoid defined but not used warning.
28 __declspec (selectany) int foo = 1; // { dg-error "selectany" }