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 | 0f074df9792ab7b9cd094811b6a22a8c18ae3963 (patch) | |
| tree | 566819ecad3cf0a30bee025cbf2e4a6fff540b8e /clang/test/CodeGen/const-init.c | |
| parent | e84af17b6ebe164b5a50362dc5522905c03912a9 (diff) | |
| download | bcm5719-llvm-0f074df9792ab7b9cd094811b6a22a8c18ae3963.tar.gz bcm5719-llvm-0f074df9792ab7b9cd094811b6a22a8c18ae3963.zip | |
Only emit string initializers in-place if types match. Fixes PR9373.
llvm-svn: 126883
Diffstat (limited to 'clang/test/CodeGen/const-init.c')
| -rw-r--r-- | clang/test/CodeGen/const-init.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/CodeGen/const-init.c b/clang/test/CodeGen/const-init.c index 32b762d646e..c6778630a0a 100644 --- a/clang/test/CodeGen/const-init.c +++ b/clang/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). |

