brintos

brintos / llvm-project-archived public Read only

0
0
Text · 464 B · 0b479fe Raw
25 lines · c
1// RUN: %clang_cc1 %s -emit-llvm -triple i386-apple-darwin -o - | FileCheck %s2extern void abort(void);3extern void exit(int);4struct T5{6unsigned i:8;7unsigned c:24;8};9int f(struct T t)10{11struct T s[1];12s[0]=t;13return(char)s->c;14}15int main(void)16{17// CHECK:  getelementptr inbounds [1 x %struct.T], ptr %s, i32 0, i32 018// CHECK:  getelementptr inbounds [1 x %struct.T], ptr %s, i32 0, i32 019struct T t;20t.i=0xff;21t.c=0xffff11;22if(f(t)!=0x11)abort();23exit(0);24}25