2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / ext / dllimport8.C
blob9052831774b899bf48dd6323750aabe15dca33be
1 //  PR c++/8378
2 //  Ignore  dllimport of static members if marked inlined.
3 //  or if definition follows  declaration in dllimported class.
5 // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
6 // { dg-options { -Wall -W } }
8 struct  __attribute__((dllimport)) Foo
9  {
10     static int static_int;
11     static void static_func1();
12     static void static_func2();
13  };
15 void Foo::static_func1()
16   {             //  { dg-warning "defined" }
17   }
19 inline void Foo::static_func2()
20  {              //  { dg-warning "inline function" }
21  }
23 void testfoo()
24
25   Foo::static_func1();
26   Foo::static_func2();
29 // { dg-final { scan-assembler-not "__imp__" } }