2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / ext / dllimport2.C
blob8acad5b0d76255460b4f9ab3a9a46fbadca0b33f
1 // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
3 // PR c++/9738  Dllimport attribute is overriden by later definition/redeclaration
5 void __attribute__((dllimport)) Bar(void);
6 void __attribute__((dllimport)) Baz(void);
7 __attribute__((dllimport)) int Biz;
8 __attribute__((dllimport)) int Boz;
10 void Foo(void)
11   {
12     Bar();
13     Baz();
14     Biz++;       
15     Boz++;       
16   }
18 void Bar(void)
19   {                     // { dg-warning "defined" }
20   }
22 void Baz(void);         // { dg-warning "redeclared" }
23 extern int Biz;         // { dg-warning "redeclared" }
24 int Boz;                // { dg-warning "defined" }
26 void foo()
28   Biz++;