PR c/64856
[official-gcc.git] / gcc / testsuite / gcc.dg / dll-5.c
blobd28603b56ee0d5330989f314a7037b92d89f29b7
1 /* { dg-do compile { target i?86-pc-cygwin } } */
2 /* { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } } */
3 /* { dg-do compile { target arm*-*-pe* } } */
5 /* { dg-options -mnop-fun-dllimport } */
7 /* The dllimport attribute should be ignored for functions. */
8 __declspec (dllimport) void dllimpfn ();
10 /* The dllimport attribute should not be ignored for variables. */
11 __declspec (dllimport) int dllimpvar;
13 /* The dllexport attribute should not be ignored. */
14 __declspec (dllexport) void dllexp ()
16 dllimpfn ();
17 dllimpvar = 0;
20 /* { dg-final { scan-assembler-not "(__imp_dllimpfn|_imp__dllimpfn)" } } */
21 /* { dg-final { scan-assembler "(__imp_dllimpvar|_imp__dllimpvar)" } } */
22 /* { dg-final { scan-assembler "\.section\[ \t\]*.drectve\n\.*-export:\[\\\\\"\]*dllexp" } } */