OSDN Git Service

PR c++/31598
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / other / pragma-re-1.C
1 /* { dg-do compile { target *-*-solaris* } } */
2 /* { dg-final { scan-assembler "bar" } } */
3 /* { dg-final { scan-assembler-not "foo" } } */
4 /* { dg-final { scan-assembler "_Z3bazv" } } */
5 /* { dg-final { scan-assembler-not "baq" } } */
6
7 #ifndef __PRAGMA_REDEFINE_EXTNAME
8 #error 
9 #endif
10
11 /* This one is expected to work.  */
12 #pragma redefine_extname foo bar
13 extern "C" int foo(void);
14 int (*p)(void) = foo;
15
16 /* This one is expected not to work (redefine_extname
17    can only be applied to extern "C" names).  */
18 #pragma redefine_extname baz baq
19 extern int baz(void);
20 int (*q)(void) = baz;