summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/exprs.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/exprs.c')
-rw-r--r--clang/test/Sema/exprs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Sema/exprs.c b/clang/test/Sema/exprs.c
index db2daf1f7ca..4ddb976eb2e 100644
--- a/clang/test/Sema/exprs.c
+++ b/clang/test/Sema/exprs.c
@@ -57,3 +57,10 @@ int test9(struct f *P) {
return R;
}
+// PR3562
+void test10(int n,...) {
+ struct S {
+ double a[n]; // expected-error {{fields must have a constant size}}
+ } s;
+ double x = s.a[0]; // should not get another error here.
+}
OpenPOWER on IntegriCloud