diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/parse/break-in-for.C')
-rw-r--r-- | gcc/testsuite/g++.dg/parse/break-in-for.C | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/parse/break-in-for.C b/gcc/testsuite/g++.dg/parse/break-in-for.C new file mode 100644 index 000000000..3028cdc80 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/break-in-for.C @@ -0,0 +1,12 @@ +/* PR17412 - ICE in fold_const.c during parsing. + fold would try to fold the operands of the break statement. */ +/* { dg-do compile } */ +/* { dg-options "" } */ + + +void foo () +{ + for (;;) + for (;;({break;})); +} + |