Dale Johannesen | 7d57e14 | 2009-02-14 00:19:28 +0000 | [diff] [blame] | 1 | // RUN: %llvmgcc %s -m32 -S -o - | grep {i32 1} | count 1 |
| 2 | // RUN: %llvmgcc %s -m32 -S -o - | grep {i32 4} | count 2 |
Dale Johannesen | 5b4e442 | 2009-06-23 18:42:26 +0000 | [diff] [blame] | 3 | // XFAIL: powerpc |
Dale Johannesen | 7d57e14 | 2009-02-14 00:19:28 +0000 | [diff] [blame] | 4 | // Every printf has 'i32 0' for the GEP of the string; no point counting those. |
| 5 | typedef unsigned int Foo __attribute__((aligned(32))); |
| 6 | typedef union{Foo:0;}a; |
| 7 | typedef union{int x; Foo:0;}b; |
| 8 | extern int printf(const char*, ...); |
| 9 | main() { |
| 10 | printf("%ld\n", sizeof(a)); |
| 11 | printf("%ld\n", __alignof__(a)); |
| 12 | printf("%ld\n", sizeof(b)); |
| 13 | printf("%ld\n", __alignof__(b)); |
| 14 | } |