aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/goto.cpp
blob: 7ebb72f54a0581843974329a579f2b80fc60e8f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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>();
}
}