In C++98/03, an uninitialized variable that has POD class type will be
uninitialized. This seems not to be the case in C++0x, where we still
call the (trivial) default constructor for a POD class
(!). Previously, we had implemented only the C++0x rules; now we
implement both. Fixes PR6536.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97928 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/statements.cpp b/test/SemaCXX/statements.cpp
index 852086e..0e27f46 100644
--- a/test/SemaCXX/statements.cpp
+++ b/test/SemaCXX/statements.cpp
@@ -15,3 +15,8 @@
later:
;
}
+
+namespace PR6536 {
+ struct A {};
+ void a() { goto out; A x; out: return; }
+}