diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/parse/stack1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/parse/stack1.C | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/parse/stack1.C b/gcc/testsuite/g++.dg/parse/stack1.C new file mode 100644 index 0000000..ac26e60 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/stack1.C @@ -0,0 +1,14 @@ +/* PR c/2161: parser stack overflow. */ +/* { dg-do compile } */ + +#define ONE else if (0) { } +#define TEN ONE ONE ONE ONE ONE ONE ONE ONE ONE ONE +#define HUN TEN TEN TEN TEN TEN TEN TEN TEN TEN TEN +#define THOU HUN HUN HUN HUN HUN HUN HUN HUN HUN HUN + +void foo() +{ + if (0) { } + /* 11,000 else if's. */ + THOU THOU THOU THOU THOU THOU THOU THOU THOU THOU THOU +} |