summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/union-init2.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-12 21:10:05 +0000
committerChris Lattner <sabre@nondot.org>2010-04-12 21:10:05 +0000
commit933f67887fcce41e73655b33da237e6bc61a46ea (patch)
tree0654db4d1b2d157c5bf6d96da2eb2263011b6b02 /clang/test/CodeGen/union-init2.c
parentf9c24f840393b275908661d575c07d307ad44d1c (diff)
downloadbcm5719-llvm-933f67887fcce41e73655b33da237e6bc61a46ea.tar.gz
bcm5719-llvm-933f67887fcce41e73655b33da237e6bc61a46ea.zip
fix PR6660/6168: emit padding as zeros instead of undef. Because
trailing fields may not be represented in initializer lists, they are being handled as padding and those fields *must* be zero initialized. llvm-svn: 101067
Diffstat (limited to 'clang/test/CodeGen/union-init2.c')
-rw-r--r--clang/test/CodeGen/union-init2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/test/CodeGen/union-init2.c b/clang/test/CodeGen/union-init2.c
index ac469cd4b51..bd56f9e688a 100644
--- a/clang/test/CodeGen/union-init2.c
+++ b/clang/test/CodeGen/union-init2.c
@@ -1,4 +1,7 @@
-// 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
union x {long long b;union x* a;} r = {.a = &r};
+
+
+// CHECK: bitcast (%0* @r to %union.x*), [4 x i8] zero \ No newline at end of file
OpenPOWER on IntegriCloud