Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.dg / ext / selectany2.C
blobaf70dcc0869fc3a8060c4ef672538a530a62448e
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.
6 extern int foo;
7 __declspec (selectany) int foo = 1;  // OK
9 struct d
11   static int foo;
13 __declspec (selectany) int d::foo = 1;  // OK 
15 struct  f
17   int i;
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. 
26 int baz()
28   __declspec (selectany)  int foo = 1;  // { dg-error "selectany" }
29   return foo;