llvm-6502/test/CFrontend/2007-08-01-LoadStoreAlign.c

18 lines
287 B
C
Raw Normal View History

// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep {align 1} | count 2
// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | llvm-as | llc
struct p {
char a;
int b;
} __attribute__ ((packed));
struct p t = { 1, 10 };
struct p u;
int main () {
int tmp = t.b;
u.b = tmp;
return tmp;
}