diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-04 18:42:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-04 18:42:16 +0000 |
commit | f81557cb719dd0d1ce3713f050fb76b0a0cb729a (patch) | |
tree | 7af0d26f2f3f4ac76115564942c3dcc85e5ba136 /test/CodeGen/init-with-member-expr.c | |
parent | b6e64c57e45e52a46b63acc10d7f468cf1339746 (diff) |
Fix PR2049, updating Eli's patch that fixes to mainline. This produces incorrect
code, but the codegen doesn't crash. I'll file a bugzilla for the AST being wrong.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49226 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/init-with-member-expr.c')
-rw-r--r-- | test/CodeGen/init-with-member-expr.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/CodeGen/init-with-member-expr.c b/test/CodeGen/init-with-member-expr.c index f82a135415..606f9dc8d0 100644 --- a/test/CodeGen/init-with-member-expr.c +++ b/test/CodeGen/init-with-member-expr.c @@ -1,4 +1,4 @@ -// RUN: clang %s -emit-llvm +// RUN: clang < %s -emit-llvm struct test { int a; }; @@ -7,3 +7,15 @@ extern struct test t; int *b=&t.a; + +// PR2049 +typedef struct mark_header_tag { + unsigned char mark[7]; +} mark_header_t; +int is_rar_archive(int fd) { + const mark_header_t rar_hdr[2] = {{0x52, 0x61, 0x72, 0x21, 0x1a, 0x07, 0x00}, {'U', 'n', 'i', 'q', 'u', 'E', '!'}}; + foo(rar_hdr); + + return 0; +} + |