diff options
| author | Dale Johannesen <dalej@apple.com> | 2009-06-23 18:42:26 +0000 |
|---|---|---|
| committer | Dale Johannesen <dalej@apple.com> | 2009-06-23 18:42:26 +0000 |
| commit | 142372142546cba1b4a6731c54bb9636dd3549c3 (patch) | |
| tree | 571db6efe2d6cb3d798d89d7e72dba53dd93e712 /llvm/test/FrontendC | |
| parent | 3417d71ff4987dbc8d78e9de78d5c3bf8fc1e1b5 (diff) | |
| download | bcm5719-llvm-142372142546cba1b4a6731c54bb9636dd3549c3.tar.gz bcm5719-llvm-142372142546cba1b4a6731c54bb9636dd3549c3.zip | |
The correct values here (as defined by gcc-4.2) are
different for ppc; add another version of the test.
llvm-svn: 73983
Diffstat (limited to 'llvm/test/FrontendC')
| -rw-r--r-- | llvm/test/FrontendC/2009-02-13-zerosize-union-field-ppc.c | 14 | ||||
| -rw-r--r-- | llvm/test/FrontendC/2009-02-13-zerosize-union-field.c | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/FrontendC/2009-02-13-zerosize-union-field-ppc.c b/llvm/test/FrontendC/2009-02-13-zerosize-union-field-ppc.c new file mode 100644 index 00000000000..947166d54ac --- /dev/null +++ b/llvm/test/FrontendC/2009-02-13-zerosize-union-field-ppc.c @@ -0,0 +1,14 @@ +// RUN: %llvmgcc %s -m32 -S -o - | grep {i32 32} | count 3 +// XFAIL: * +// XTARGET: powerpc +// 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)); +} diff --git a/llvm/test/FrontendC/2009-02-13-zerosize-union-field.c b/llvm/test/FrontendC/2009-02-13-zerosize-union-field.c index 044cbd5a556..ad335583d46 100644 --- a/llvm/test/FrontendC/2009-02-13-zerosize-union-field.c +++ b/llvm/test/FrontendC/2009-02-13-zerosize-union-field.c @@ -1,5 +1,6 @@ // RUN: %llvmgcc %s -m32 -S -o - | grep {i32 1} | count 1 // RUN: %llvmgcc %s -m32 -S -o - | grep {i32 4} | count 2 +// XFAIL: powerpc // 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; |

