diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/parse-else-error.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/parse-else-error.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/parse-else-error.c b/gcc/testsuite/gcc.dg/parse-else-error.c new file mode 100644 index 0000000..ca20bdf --- /dev/null +++ b/gcc/testsuite/gcc.dg/parse-else-error.c @@ -0,0 +1,12 @@ +/* PR 23722 */ +/* { dg-do compile } */ +/* { dg-options "-fsyntax-only" } */ +int f() +{ + if (1) + { + return 1; + else /* { dg-error "expected .\}. before 'else'" } */ + { + } +} |