summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/pragma-ep-1.C
blob: 9362943a527d73ad39023d388eae6700844a4d6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* { dg-do compile { target *-*-osf5* } } */
/* { dg-final { scan-assembler "xyzzy_one" } } */
/* { dg-final { scan-assembler "xyzzy_two" } } */
/* { dg-final { scan-assembler "xyzzz_three" } } */
/* { dg-final { scan-assembler "four" } } */
/* { dg-final { scan-assembler-not "_four" } } */

#ifndef __PRAGMA_EXTERN_PREFIX
#error
#endif

#pragma extern_prefix "xyzzy_"

extern "C" int one(void);
extern "C" int two(void);

#pragma extern_prefix "xyzzz_"

extern "C" int three(void);

#pragma extern_prefix ""

extern "C" int four(void);

int (*p[])(void) = {
  one, two, three, four
};