summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/pr34692.c
blob: bcb0ca33d240f26d083fe2f7c70045ccf4e8485d (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
28
29
30
31
32
33
34
35
/* PR preprocessor/34692 */
/* { dg-do compile } */
/* { dg-options "" } */
/* { dg-require-visibility "" } */
/* { dg-final { scan-hidden "vara" } } */
/* { dg-final { scan-hidden "varb" } } */
/* { dg-final { scan-hidden "varc" } } */
/* { dg-final { scan-hidden "vard" } } */
/* { dg-final { scan-assembler "a b cde f g h" } } */

#define FOO(y, x) y #x
#define BAR(x) x
#define BAZ(x) x
FOO (const char *vara =,
a
#pragma GCC visibility push(hidden)
b
#pragma GCC visibility push(hidden)
cde f g h);
int varb = 6;
#pragma GCC visibility pop
#pragma GCC visibility pop
FOO (
BAR (
#pragma GCC visibility push(hidden)
const) char *varc =,);
#pragma GCC visibility pop
FOO (
BAR (
BAZ (
#pragma GCC visibility push(hidden)
#pragma GCC visibility push(hidden)
const) char) *vard =,);
#pragma GCC visibility pop
#pragma GCC visibility pop