blob: 580ae889d8f21bc83b247017f35c9b76d700d261 [file] [log] [blame]
Eric Christophera11d1292011-07-26 00:57:50 +00001// RUN: %clang_cc1 %s -emit-llvm -triple i386-apple-darwin -o - | FileCheck %s
2extern void abort();
3extern void exit(int);
4struct T
5{
6unsigned i:8;
7unsigned c:24;
8};
9f(struct T t)
10{
11struct T s[1];
12s[0]=t;
13return(char)s->c;
14}
15main()
16{
17// CHECK: getelementptr inbounds [1 x %struct.T]* %s, i32 0, i32 0
18// CHECK: getelementptr inbounds [1 x %struct.T]* %s, i32 0, i32 0
19struct T t;
20t.i=0xff;
21t.c=0xffff11;
22if(f(t)!=0x11)abort();
23exit(0);
24}