diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-08-20 20:55:45 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-08-20 20:55:45 +0000 |
commit | f0a26499c0ef62c7940b596be092315922a46ab7 (patch) | |
tree | 75d5ccc2fd953713a9262550f9536ec197e6b28a /test/CodeGen/const-init.c | |
parent | 1da79335fcb5e42010ace09a38d0ecbf3657b9d2 (diff) |
Fix InitListExpr::isStringLiteralInit so it handles various edge cases correctly. PR13643.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162226 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/const-init.c')
-rw-r--r-- | test/CodeGen/const-init.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/const-init.c b/test/CodeGen/const-init.c index 4f3f7ab553..5f729b8df4 100644 --- a/test/CodeGen/const-init.c +++ b/test/CodeGen/const-init.c @@ -144,3 +144,18 @@ void g28() { static v12i16 b = (v2f80){1,2}; static v2f80 c = (v12i16){0,0,0,-32768,16383,0,0,0,0,-32768,16384,0}; } + +// PR13643 +void g29() { + typedef char DCC_PASSWD[2]; + typedef struct + { + DCC_PASSWD passwd; + } DCC_SRVR_NM; + // CHECK: @g29.a = internal global %struct.DCC_SRVR_NM { [2 x i8] c"@\00" }, align 1 + // CHECK: @g29.b = internal global [1 x i32] [i32 ptrtoint ([5 x i8]* @.str to i32)], align 4 + // CHECK: @g29.c = internal global [1 x i32] [i32 97], align 4 + static DCC_SRVR_NM a = { {"@"} }; + static int b[1] = { "asdf" }; + static int c[1] = { L"a" }; +} |