Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/torture/pr40642.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// { dg-do compile } /* { dg-require-profiling "-fprofile-generate" } */ // { dg-options "-fprofile-generate" } // GCC used to ICE with some EH edge missing. inline void* operator new(__SIZE_TYPE__, void* p) throw() { return p; } inline void operator delete (void*, void*) throw() { } template<typename T> void foo(void* p, T t) { new(p) T(t); } void bar(); template<typename T> struct A { T* p; A() { try { foo(p, T()); } catch(...) {} } A(const A&) { try { bar(); } catch(...) { throw; } } }; A<A<int> > a;