minix/external/bsd/llvm/dist/clang/test/CodeGen/2009-02-13-zerosize-union-field-ppc.c
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

14 lines
507 B
C

// REQUIRES: ppc32-registered-target
// RUN: %clang_cc1 %s -triple powerpc-pc-linux -emit-llvm -o - | grep {i32 32} | count 3
// XFAIL: *
// Every printf has 'i32 0' for the GEP of the string; no point counting those.
typedef unsigned int Foo __attribute__((aligned(32)));
typedef union{Foo:0;}a;
typedef union{int x; Foo:0;}b;
extern int printf(const char*, ...);
main() {
printf("%ld\n", sizeof(a));
printf("%ld\n", __alignof__(a));
printf("%ld\n", sizeof(b));
printf("%ld\n", __alignof__(b));
}