summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGenCXX/goto.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/goto.cpp b/clang/test/CodeGenCXX/goto.cpp
new file mode 100644
index 00000000000..7ebb72f54a0
--- /dev/null
+++ b/clang/test/CodeGenCXX/goto.cpp
@@ -0,0 +1,29 @@
+// RUN: %clang-cc1 %s -fexceptions
+
+// Reduced from a crash on boost::interprocess's node_allocator_test.cpp.
+namespace test0 {
+ struct A { A(); ~A(); };
+ struct V { V(const A &a = A()); ~V(); };
+
+ template<int X> int vector_test()
+ {
+ A process_name;
+ try {
+ A segment;
+
+ V *stdvector = new V();
+
+ int x = 5, y = 7;
+ if(x == y) return 1;
+ }
+ catch(int ex){
+ return 1;
+ }
+ return 0;
+}
+
+int main ()
+{
+ return vector_test<0>();
+}
+}
OpenPOWER on IntegriCloud