blob: 3683d08b65c6024e9d5cc7f3a23ed68b7e1d947c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Test that inline functions are exported with -fkeep-inline-functions.
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw*} }
// { dg-options -fkeep-inline-functions }
__attribute__((dllexport)) inline int foo (int a) { return a;}
class __attribute__((dllexport)) Bar
{
public:
Bar(){};
int inline_bar(int a) {return a;}
int outline_bar(int a);
};
int Bar::outline_bar(int a) {return foo (a);}
Bar abar;
// { dg-final { scan-assembler "\.section\[ \t\]*.drectve\n.*_ZN3Bar11outline_barEi" } }
// { dg-final { scan-assembler " -export:\[\\\\\"\]*_ZN3Bar10inline_barEi" } }
// { dg-final { scan-assembler " -export:\[\\\\\"\]*_Z3fooi" } }
|