Merge reload-branch up to revision 101000
[official-gcc.git] / gcc / testsuite / gcc.dg / dll-3.c
blob2d5517eace62aa49126b584de6916c0b56a8f6d1
1 /* Ensure dllexport overrides dllimport. */
3 /* { dg-do compile { target arm*-*-pe* } } */
4 /* { dg-do compile { target i?86-pc-cygwin } } */
5 /* { dg-do compile { target i?86-pc-mingw* } } */
7 __declspec (dllimport) int foo1 ();
8 __declspec (dllexport) int foo1 ();
10 __declspec (dllexport) int foo2 ();
11 __declspec (dllimport) int foo2 ();
13 __declspec (dllexport) int foo1 () { return foo2 (); }
14 __declspec (dllexport) int foo2 () { return foo1 (); }
16 /* { dg-final { scan-assembler "\.section\[ \t\]*.drectve\n.*-export:foo2" } } */
17 /* { dg-final { scan-assembler "-export:foo1" } } */
18 /* { dg-final { scan-assembler-not "(__imp_foo1|_imp__foo1|__imp_foo2|_imp__foo2)" } } */