| 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* } } */ |
| 4 |
|
| 5 |
/* { dg-options -mnop-fun-dllimport } */ |
| 6 |
|
| 7 |
/* The dllimport attribute should be ignored for functions. */ |
| 8 |
__declspec (dllimport) void dllimpfn (); |
| 9 |
|
| 10 |
/* The dllimport attribute should not be ignored for variables. */ |
| 11 |
__declspec (dllimport) int dllimpvar; |
| 12 |
|
| 13 |
/* The dllexport attribute should not be ignored. */ |
| 14 |
__declspec (dllexport) void dllexp () |
| 15 |
{ |
| 16 |
dllimpfn (); |
| 17 |
dllimpvar = 0; |
| 18 |
} |
| 19 |
|
| 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" } } */ |