summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/switch-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/switch-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/switch-2.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/switch-2.c b/gcc/testsuite/gcc.dg/switch-2.c
new file mode 100644
index 000000000..cedb69f7b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/switch-2.c
@@ -0,0 +1,10 @@
+/* PR c/9262 */
+/* Originator: Rasmus Hahn <rassahah@neofonie.de> */
+/* { dg-do compile } */
+
+int foo(int i)
+{
+ switch (i)
+ case 3:
+ return 1,
+} /* { dg-error "parse error|syntax error|expected" } */