Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / ext / dllimport12.C
blob9868596a899bc833c0e9ad9fbd870013cc38cc0f
1 // PR target/27650
2 // Don't use dllimport semantics on virtual methods when initializing
3 // vtables
4 // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
6 // Use import lib thunk for vtable entry of explicitly virtual method,
7 struct base
9   virtual void key_method();
10   __attribute__((dllimport)) virtual ~base();
13 void base::key_method() {}
16 // Likewise for an implicitly virtual method.
17 struct derived : public base
19   void key_method(); 
20   __attribute__((dllimport)) ~derived();
23 void derived::key_method() {}