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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do link }
2
// { dg-require-dll "" }
3
// { dg-additional-sources "dllexport2a.cc" }
4
// { dg-options "-O2" }
5
 
6
/* Test that inline functions declared "dllexport" appear in object
7
   files, even if they are not called.
8
 
9
   This behavior is required by the ARM C++ ABI:
10
 
11
     Exporting a function that can be inlined should force the
12
     creation and export of an out-of-line copy of it.
13
 
14
   and should presumably also apply.
15
 
16
   Visual Studio 2005 also honors that rule.  */
17
 
18
__declspec(dllexport) inline void i1() {}
19
 
20
__declspec(dllexport) extern inline void e1() {}
21
 
22
/* It is invalid to declare the function inline after its definition.  */
23
#if 0
24
__declspec(dllexport) void i2() {}
25
inline void i2();
26
 
27
__declspec(dllexport) extern void e2() {}
28
inline void e2();
29
#endif
30
 
31
__declspec(dllexport) inline void i3() {}
32
void i3();
33
 
34
__declspec(dllexport) inline void e3() {}
35
extern void e3();
36
 
37
__declspec(dllexport) void i4();
38
inline void i4() {};
39
 
40
__declspec(dllexport) extern void e4();
41
inline void e4() {};
42
 
43
__declspec(dllexport) inline void i5();
44
void i5() {};
45
 
46
__declspec(dllexport) inline void e5();
47
extern void e5() {};
48
 
49
/* Make sure that just declaring the function -- without defining it
50
   -- does not cause errors.  */
51
__declspec(dllexport) inline void i6();
52
__declspec(dllexport) extern inline void e6();

powered by: WebSVN 2.1.0

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