summaryrefslogtreecommitdiffstats
path: root/test/Sema/compound-literal.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/compound-literal.c')
-rw-r--r--test/Sema/compound-literal.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/Sema/compound-literal.c b/test/Sema/compound-literal.c
index aade464..4130762 100644
--- a/test/Sema/compound-literal.c
+++ b/test/Sema/compound-literal.c
@@ -3,9 +3,10 @@
struct foo { int a, b; };
static struct foo t = (struct foo){0,0};
-static struct foo t2 = {0,0};
+static struct foo t1 = __builtin_choose_expr(0, (struct foo){0,0}, (struct foo){0,0});
+static struct foo t2 = {0,0};
static struct foo t3 = t2; // -expected-error {{initializer element is not a compile-time constant}}
-static int *p = (int []){2,4};
+static int *p = (int []){2,4};
static int x = (int){1};
static int *p2 = (int []){2,x}; // -expected-error {{initializer element is not a compile-time constant}}
OpenPOWER on IntegriCloud