libgfortran/ChangeLog:
[official-gcc.git] / gcc / testsuite / gcc.dg / dll-3.c
blobf68758ccaa02092183021360724fdcf67020c994
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-*-mingw* x86_64-*-mingw*} } */
7 __declspec (dllimport) int foo1 ();
8 __declspec (dllexport) int foo1 (); /* { dg-warning "previous dllimport ignored" } */
10 __declspec (dllexport) int foo2 ();
11 __declspec (dllimport) int foo2 (); /* { dg-warning "dllimport ignored" } */
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)" } } */