OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [dllexport-MI1.C] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw*} }
2
//  Test that non-virtual MI thunks are exported.
3
 
4
 
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
8
 
9
#define BUILDING_MI_DLL
10
#include "dll-MI1.h"
11
 
12
MBase::~MBase(){}
13
 
14
int D1::vf() const { return D1_return; }
15
 
16
D2::D2() { }
17
D2::D2 (D2 const&) { }
18
int D2::vf() const { return D2_return; }
19
 
20
int MI1::vf() const { return D1::vf();}
21
 
22
// a dllexported object
23
DLL_IMPEXP MI1 dllMI1;
24
 
25
// use default copy ctor
26
DLL_IMPEXP MI1 dllMI1Copy =  dllMI1;
27
 
28
// Scan for export of some methods that are undefined in dllimportMI1.C,
29
 
30
// { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZNK2D12vfEv" } }
31
// { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZNK2D22vfEv" } }
32
// { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZNK3MI12vfEv" } }
33
 
34
// and MI thunks,
35
 
36
// { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZThn._NK3MI12vfEv" } }
37
// { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZTv0_n.._NK2D12vfEv" } }
38
 
39
// and a vtable data variable.
40
 
41
// { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZTV2D1\[\\\\\"\]*,data" } }
42
 
43
// an explicit copy ctor
44
// { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZN2D2C2ERKS_" } }
45
 
46
// but not implicit copy ctor generated by compiler
47
// nor implicit dtor
48
 
49
// { dg-final { scan-assembler-not "-export:\[\\\\\"\]*_ZN2D1C2ERKS_" } }
50
// { dg-final { scan-assembler-not "-export:\[\\\\\"\]*_ZN2D1D2Ev" } }
51
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.