From 62b6a65f0bef3ada0d8bac1a98f7e0769e6e8ffb Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Mon, 1 Sep 2008 22:28:55 +0000 Subject: [PATCH] readd test as it passes correctly. nice, but weird git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55615 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Sema/array-init.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/Sema/array-init.c b/test/Sema/array-init.c index 6494b9593e..bf3d83d265 100644 --- a/test/Sema/array-init.c +++ b/test/Sema/array-init.c @@ -222,5 +222,19 @@ struct {int:5;} x[] = {6}; //expected-error{{initializer for aggregate with no e struct {int a; int:5;} noNamedImplicit[] = {1,2,3}; int noNamedImplicitCheck[sizeof(noNamedImplicit) == 3 * sizeof(*noNamedImplicit) ? 1 : -1]; + +// ptrs are constant +struct soft_segment_descriptor { + int ssd_base; +}; +static int dblfault_tss; + +union uniao { int ola; } xpto[1]; + +struct soft_segment_descriptor gdt_segs[] = { + {(int) &dblfault_tss}, + { (int)xpto}, +}; + static void sppp_ipv6cp_up(); const struct {} ipcp = { sppp_ipv6cp_up }; //expected-warning{{empty struct extension}} expected-warning{{excess elements in array initializer}} -- 2.40.0