aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/cpp/pr104147.c
blob: 4ee237ed6babf823bec8fdd412c29c573e754f69 (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
/* PR preprocessor/104147 */
/* { dg-do run } */

#define X(x,y) 	x y
#define STR_(x) #x
#define STR(x) 	STR_(x)
const char *str =
STR(X(Y,Y))
#define Y()
STR(X(Y,Y))
#undef Y
STR(X(Y,Y))
#define Y()
STR(X(Y,Y))
STR(X(Y,
Y))
STR(X(Y
,Y))
;

int
main ()
{
  if (__builtin_strcmp (str, "Y YY YY YY YY YY Y") != 0)
    __builtin_abort ();
  return 0;
}