summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/value-init.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-12-21 03:17:28 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-12-21 03:17:28 +0000
commit0dbe2fb7758fe64568206b5bc0f1c5b106b9c806 (patch)
treeb56ca19aac3cf3af16adebe90f8e2261bb8fc74e /test/CodeGenCXX/value-init.cpp
parent98ab776a8a9e19c7bf1bd04d610ec2b2c37aef7a (diff)
Reinstate r170806, reverted in r170835, with a fix use i1 instead of i8 for a value-initialized bool!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170837 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/value-init.cpp')
-rw-r--r--test/CodeGenCXX/value-init.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/CodeGenCXX/value-init.cpp b/test/CodeGenCXX/value-init.cpp
index 6e60f80110..60dca99045 100644
--- a/test/CodeGenCXX/value-init.cpp
+++ b/test/CodeGenCXX/value-init.cpp
@@ -256,6 +256,12 @@ namespace PR11124 {
// CHECK-NEXT: call void @_ZN7PR111242B2C2Ev
}
+// Ensure we produce an i1 here, and don't assert.
+// CHECK: define void @_Z9r170806_bv(
+// CHECK: call void @_Z9r170806_ab(i1 zeroext false)
+void r170806_a(bool b = bool());
+void r170806_b() { r170806_a(); }
+
// CHECK: define linkonce_odr void @_ZN8zeroinit2X3IiEC2Ev(%"struct.zeroinit::X3"* %this) unnamed_addr
// CHECK: call void @llvm.memset.p0i8.i64
// CHECK-NEXT: call void @_ZN8zeroinit2X2IiEC2Ev