1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 < %s -emit-llvm
2*f4a2713aSLionel Sambuc struct test {
3*f4a2713aSLionel Sambuc int a;
4*f4a2713aSLionel Sambuc };
5*f4a2713aSLionel Sambuc
6*f4a2713aSLionel Sambuc extern struct test t;
7*f4a2713aSLionel Sambuc
8*f4a2713aSLionel Sambuc int *b=&t.a;
9*f4a2713aSLionel Sambuc
10*f4a2713aSLionel Sambuc
11*f4a2713aSLionel Sambuc // PR2049
12*f4a2713aSLionel Sambuc typedef struct mark_header_tag {
13*f4a2713aSLionel Sambuc unsigned char mark[7];
14*f4a2713aSLionel Sambuc } mark_header_t;
is_rar_archive(int fd)15*f4a2713aSLionel Sambuc int is_rar_archive(int fd) {
16*f4a2713aSLionel Sambuc const mark_header_t rar_hdr[2] = {{0x52, 0x61, 0x72, 0x21, 0x1a, 0x07, 0x00}, {'U', 'n', 'i', 'q', 'u', 'E', '!'}};
17*f4a2713aSLionel Sambuc foo(rar_hdr);
18*f4a2713aSLionel Sambuc
19*f4a2713aSLionel Sambuc return 0;
20*f4a2713aSLionel Sambuc }
21*f4a2713aSLionel Sambuc
22