aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/scope-check.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/scope-check.c')
-rw-r--r--test/Sema/scope-check.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Sema/scope-check.c b/test/Sema/scope-check.c
index 20cecbf3f3..d09ad9c5d5 100644
--- a/test/Sema/scope-check.c
+++ b/test/Sema/scope-check.c
@@ -22,3 +22,11 @@ int test3() {
L:
return a;
}
+
+int test4(int x) {
+ goto L; // expected-error{{illegal jump}}
+ int a[x];
+ test4(x);
+ L:
+ return sizeof a;
+}