1 // Report error if dllimport attribute in definition itself.
2 // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
4 __attribute__((dllimport)) void bar () { } // { dg-error "definition" }
6 __attribute__((dllimport)) int foo = 1; // { dg-error "definition" }
10 __attribute__((dllimport)) int faa = 1; // { dg-error "definition" }
14 __attribute__((dllimport)) int fee (1); // { dg-error "definition" }
17 // In-class initialization of a static data member is not a definition.
20 __attribute__ ((dllimport)) static const int i = 1; // OK
23 // Reference the dllimport'd static data member.
31 __attribute__ ((dllimport)) static const int i = 1;
34 // Define the static data member _without_ the dllimport.
35 // This should override the prior declaration with dllimport.
37 const int G::i; // { dg-warning "dllimport ignored" }