1 // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw*} }
2 // Test that non-virtual MI thunks are exported.
5 // To build the dll and client app:
6 // g++ -shared -o MI.dll dllexport-MI1.C
7 // g++ -o MItest.exe dllimport-MI1.C -L. MI.dll
9 #define BUILDING_MI_DLL
14 int D1::vf() const { return D1_return; }
17 D2::D2 (D2 const&) { }
18 int D2::vf() const { return D2_return; }
20 int MI1::vf() const { return D1::vf();}
22 // a dllexported object
23 DLL_IMPEXP MI1 dllMI1;
25 // use default copy ctor
26 DLL_IMPEXP MI1 dllMI1Copy = dllMI1;
28 // Scan for export of some methods that are undefined in dllimportMI1.C,
30 // { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZNK2D12vfEv" } }
31 // { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZNK2D22vfEv" } }
32 // { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZNK3MI12vfEv" } }
36 // { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZThn4_NK3MI12vfEv" } }
37 // { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZTv0_n12_NK2D12vfEv" } }
39 // and a vtable data variable.
41 // { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZTV2D1\[\\\"\]*,data" } }
43 // an explicit copy ctor
44 // { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZN2D2C2ERKS_" } }
46 // but not implicit copy ctor generated by compiler
49 // { dg-final { scan-assembler-not "-export:\[\\\\\"\]*_ZN2D1C2ERKS_" } }
50 // { dg-final { scan-assembler-not "-export:\[\\\\\"\]*_ZN2D1D2Ev" } }