diff options
Diffstat (limited to 'test/CodeGen/union-init2.c')
-rw-r--r-- | test/CodeGen/union-init2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/CodeGen/union-init2.c b/test/CodeGen/union-init2.c new file mode 100644 index 0000000..184d75f --- /dev/null +++ b/test/CodeGen/union-init2.c @@ -0,0 +1,4 @@ +// RUN: clang-cc -emit-llvm %s -o - -triple i686-pc-linux-gnu | grep "bitcast (%0\* @r to %union.x\*), \[4 x i8\] zeroinitializer" + +// Make sure we generate something sane instead of a ptrtoint +union x {long long b;union x* a;} r = {.a = &r}; |