diff options
Diffstat (limited to 'test/CodeGen/union-init2.c')
| -rw-r--r-- | test/CodeGen/union-init2.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/CodeGen/union-init2.c b/test/CodeGen/union-init2.c index ac469cd4b512..1386c27cc0bd 100644 --- a/test/CodeGen/union-init2.c +++ b/test/CodeGen/union-init2.c @@ -1,4 +1,13 @@ -// RUN: %clang_cc1 -emit-llvm %s -o - -triple i686-pc-linux-gnu | grep "bitcast (%0\* @r to %union.x\*), \[4 x i8\] undef" +// RUN: %clang_cc1 -emit-llvm %s -o - -triple i686-pc-linux-gnu | FileCheck %s // Make sure we generate something sane instead of a ptrtoint +// CHECK: bitcast (%0* @r to %union.x*), [4 x i8] undef union x {long long b;union x* a;} r = {.a = &r}; + + +// CHECK: global %1 { [3 x i8] zeroinitializer, [5 x i8] undef } +union z { + char a[3]; + long long b; +}; +union z y = {}; |
