1 // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
3 // PR 10148 Dllimport attribute of object is overriden by later
4 // redefinition without attribute.
11 __attribute__((dllimport)) struct Foo f;
15 void* dummy = (void*) &f;
18 struct Foo f; // { dg-warning "referenced with dll linkage" }
20 // Dllimport'd symbols do not have a constant address, so following
21 // assignment would require static_initialization_and_destruction
22 // if attribute is retained.