summaryrefslogtreecommitdiffstats
path: root/test/Sema/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/init.c')
-rw-r--r--test/Sema/init.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/test/Sema/init.c b/test/Sema/init.c
index 2527e14..81a665d 100644
--- a/test/Sema/init.c
+++ b/test/Sema/init.c
@@ -18,10 +18,19 @@ extern int x;
void *g = &x;
int *h = &x;
+struct union_crash
+{
+ union
+ {
+ };
+};
+
int test() {
-int a[10];
-int b[10] = a; // expected-error {{array initializer must be an initializer list}}
-int +; // expected-error {{expected identifier or '('}}
+ int a[10];
+ int b[10] = a; // expected-error {{array initializer must be an initializer list}}
+ int +; // expected-error {{expected identifier or '('}}
+
+ struct union_crash u = { .d = 1 }; // expected-error {{field designator 'd' does not refer to any field in type 'struct union_crash'}}
}
OpenPOWER on IntegriCloud