diff options
author | Chris Lattner <sabre@nondot.org> | 2011-02-19 22:28:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-02-19 22:28:58 +0000 |
commit | e0fd832b076eb5a1e4a4549687af0dbf2ad57181 (patch) | |
tree | e5494d43a81380ee7d6c9527e6393fd42df3b5d2 /test/CodeGen/init.c | |
parent | 944ed3b8dba3a129937a4e627d235ad99d225da9 (diff) |
implement a tiny amount of codegen support for gnu array range
designators: allowing codegen when the element initializer is a
constant or something else without a side effect. This unblocks
enough to let process.c in the linux kernel build, PR9257.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126056 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/init.c')
-rw-r--r-- | test/CodeGen/init.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/init.c b/test/CodeGen/init.c index ccb04f343c..0f94729a94 100644 --- a/test/CodeGen/init.c +++ b/test/CodeGen/init.c @@ -100,3 +100,18 @@ int test10(int X) { // CHECK-NOT: store i32 0 // CHECK: call void @bar } + + +// PR9257 +struct test11S { + int A[10]; +}; +void test11(struct test11S *P) { + *P = (struct test11S) { .A = { [0 ... 3] = 4 } }; + // CHECK: @test11 + // CHECK: store i32 4 + // CHECK: store i32 4 + // CHECK: store i32 4 + // CHECK: store i32 4 + // CHECK: ret void +} |