aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/dllimport1.C
blob: d7ddfe8a24ee4635d5284454a7bd1cd212fd86e5 (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
30
31
//  PR c++/7910
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
// { dg-options { -Wall -W } }

class __attribute__((dllimport)) Foo
{
 public:
  virtual void dummy_foo_func(void)
    {}
  void dummy_foo_fun2();
  virtual ~Foo();  //  avoid warning  
};

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

class Bar : public Foo
{
public:
  ~Bar();
  void dummy_bar_func();
};

Bar::~Bar()
{}

void Bar::dummy_bar_func()
{}

// { dg-final { scan-assembler-not "__imp\[_\]*__ZN3Foo14dummy_foo_fun" } }