Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / testsuite / g++.dg / other / pragma-re-1.C
blobfce1dc193e73b8c6ea7a2340d4b131debf6f7deb
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" } } */
7 #ifndef __PRAGMA_REDEFINE_EXTNAME
8 #error 
9 #endif
11 /* This one is expected to work.  */
12 #pragma redefine_extname foo bar
13 extern "C" int foo(void);
14 int (*p)(void) = foo;
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;