[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gcc.dg / dll-4.c
blobe2d701b47b83f4d6ebe91664b0b5eec4e88c9c86
1 /* { dg-do compile { target arm*-*-pe* } } */
2 /* { dg-do compile { target i?86-pc-cygwin } } */
3 /* { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } } */
5 __declspec (dllimport) int foo1;
6 int foo1; /* { dg-warning "redeclared without dllimport" } */
8 __declspec (dllimport) int foo2;
9 int foo2 = 5; /* { dg-warning "redeclared without dllimport" } */
11 int f () { return foo1 + foo2; }
13 /* FIXME: We should scan the output of nm for this case. */
14 /* { dg-final { scan-assembler "(foo2:)" } } */
15 /* { dg-final { scan-assembler "(\.comm\[ \t_\]*foo1)" } } */
16 /* { dg-final { scan-assembler-not "(__imp_|_imp__)" } } */