summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/dll-4.C
blob: ea5593e5fd8c399003247e910b74be0d165df3ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-do assemble { target arm-*-*pe } }
// Ensure dllexport overrides dllimport.
// set compiler_result "\.section${spaces}\.drectve\n\[^\n\]*-export:foo1.*\.section${spaces}\.drectve\n\[^\n\]*-export:foo2"
// set not_compiler_result "(__imp_foo1|__imp_foo2)"

__declspec (dllimport) int foo1 ();
__declspec (dllexport) int foo1 ();

__declspec (dllexport) int foo2 ();
__declspec (dllimport) int foo2 ();

__declspec (dllexport) int foo1 () { return foo2 (); }
__declspec (dllexport) int foo2 () { return foo1 (); }