summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/array-init.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/array-init.c')
-rw-r--r--clang/test/Sema/array-init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Sema/array-init.c b/clang/test/Sema/array-init.c
index 2ddd2459351..a7f27b68f86 100644
--- a/clang/test/Sema/array-init.c
+++ b/clang/test/Sema/array-init.c
@@ -208,3 +208,7 @@ struct bittest bittestvar = {1, 2, 3, 4}; //expected-warning{{excess elements in
int u1 = {}; //expected-warning{{use of GNU empty initializer extension}} expected-error{{scalar initializer cannot be empty}}
int u2 = {{3}}; //expected-error{{too many braces around scalar initializer}}
+// PR2362
+void varArray() {
+ int c[][x] = { 0 }; //expected-error{{variable-sized object may not be initialized}}
+}
OpenPOWER on IntegriCloud