1 /* Tests that macros that look recursive but are not are accepted. */
3 /* { dg-do preprocess } */
6 g(g(g(g(g(g(g
)))))); /* { dg-bogus "detected recursion" } */
8 /* This macro gets longer with each loop, to thwart tests for
9 recursion based on length. */
10 #define f(a,b,c,d,e,f,g,h,i) a(b,c,d,e,f,g,h,i,2 3 4 5)
11 f(f
,f
,f
,f
,f
,f
,f
,f
,f
) /* { dg-bogus "detected recursion" } */
13 /* The above cases should be enough, but this is taken from cccp
14 sources so let's try it too. */
15 #define foo(x,y) bar (x (y,0), y)
16 foo (foo
, baz
); /* { dg-bogus "detected recursion" } */
19 mac
/* { dg-bogus "detected recursion" } */
22 "mac2" /* { dg-bogus "detected recursion" } */
25 macro mac2 /* { dg-bogus "detected recursion" } */