summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/dllimport8.C
blob: af605a368242a5e3790725ea85ca6d3a9794db5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//  PR c++/8378
//  Ignore  dllimport of static members if marked inlined.
//  or if definition follows  declaration in dllimported class.

// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
// { dg-options { -Wall -W } }

struct  __attribute__((dllimport)) Foo
{
  static int static_int;
  static void static_func1();
  static void static_func2();
 };

void Foo::static_func1()	//  { dg-warning "redeclared without dllimport" }
{
}

inline void Foo::static_func2()
{
}

void testfoo()
{ 
  Foo::static_func1();
  Foo::static_func2();
}

// { dg-final { scan-assembler-not "__imp_" } }