John McCall | 23c51b5 | 2010-10-05 20:53:58 +0000 | [diff] [blame] | 1 | // RUN: %clang-cc1 %s -fexceptions -emit-llvm-only |
John McCall | e71d60d | 2010-10-05 20:48:15 +0000 | [diff] [blame] | 2 | |
| 3 | // Reduced from a crash on boost::interprocess's node_allocator_test.cpp. |
| 4 | namespace test0 { |
| 5 | struct A { A(); ~A(); }; |
| 6 | struct V { V(const A &a = A()); ~V(); }; |
| 7 | |
| 8 | template<int X> int vector_test() |
| 9 | { |
| 10 | A process_name; |
| 11 | try { |
| 12 | A segment; |
| 13 | |
| 14 | V *stdvector = new V(); |
| 15 | |
| 16 | int x = 5, y = 7; |
| 17 | if(x == y) return 1; |
| 18 | } |
| 19 | catch(int ex){ |
| 20 | return 1; |
| 21 | } |
| 22 | return 0; |
| 23 | } |
| 24 | |
| 25 | int main () |
| 26 | { |
| 27 | return vector_test<0>(); |
| 28 | } |
| 29 | } |