1 // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
2 // Report error if static symbol definition has dllimport attribute.
4 __attribute__((dllimport))
5 int impvar; // OK, implicit "extern"
7 static __attribute__((dllimport))
8 int static_impvar; // { dg-error "external linkage" }
10 static __attribute__((dllexport))
11 int static_expvar; // { dg-error "external linkage" }
13 static __attribute__((dllimport))
14 void static_impfun(void); // { dg-error "external linkage" }
18 __attribute__((dllimport))
19 int foovar; // OK, implicit "extern"
25 __attribute__((dllexport))
26 int barvar; // { dg-error "external linkage" }