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 | 579a05d767674b7e8b45161e1489a29ee3c25de2 (patch) | |
tree | 3d29c78409e5cc29d9c7493fa9dd86690d7ac928 /clang/test | |
parent | c7d38433cd86f49bd50bc6fb88faf4d4a0ae6cbb (diff) | |
download | bcm5719-llvm-579a05d767674b7e8b45161e1489a29ee3c25de2.tar.gz bcm5719-llvm-579a05d767674b7e8b45161e1489a29ee3c25de2.zip |
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.
llvm-svn: 49226
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGen/init-with-member-expr.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/clang/test/CodeGen/init-with-member-expr.c b/clang/test/CodeGen/init-with-member-expr.c index f82a135415a..606f9dc8d00 100644 --- a/clang/test/CodeGen/init-with-member-expr.c +++ b/clang/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; +} + |