diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-03-02 21:27:44 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-03-02 21:27:44 +0000 |
commit | 0483a6fcf8a70f1dd900b634300510c7991a1c7c (patch) | |
tree | 05b103d118874ef9e2b348f0b10ef87da0556924 /test/CodeGen/const-init.c | |
parent | 75e85048e73fcde2ce9d8a48dfdb1220e132eb59 (diff) |
Only emit string initializers in-place if types match. Fixes PR9373.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126883 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/const-init.c')
-rw-r--r-- | test/CodeGen/const-init.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/CodeGen/const-init.c b/test/CodeGen/const-init.c index 32b762d646..c6778630a0 100644 --- a/test/CodeGen/const-init.c +++ b/test/CodeGen/const-init.c @@ -4,6 +4,10 @@ // Brace-enclosed string array initializers char a[] = { "asdf" }; +// CHECK: @a = global [5 x i8] c"asdf\00" + +char a2[2][5] = { "asdf" }; +// CHECK: @a2 = global [2 x [5 x i8]] {{\[}}[5 x i8] c"asdf\00", [5 x i8] zeroinitializer] // Double-implicit-conversions of array/functions (not legal C, but // clang accepts it for gcc compat). |