Could I convince you to have a look at the transactional-memory branch
test libitm/testsuite/libitm.c++/eh-1.C? I'm getting
z.c:36:1: error: edge void f1()->void* __cxa_allocate_exception(long
unsigned int) has no corresponding call_stmt
D.2114_4 = __cxa_allocate_exception (4);
z.c:36:1: error: edge void f1()->void __cxa_throw(void*, void*, void
(*)(void*)) has no corresponding call_stmt
__cxa_throw (D.2114_4, &_ZTIi, 0B);
void f1()/10(-1) @0x7ffff2d75500 availability:available 32 time, 10
benefit 14 size, 1 benefit reachable body finalized
called by: void f2()/1 (1.00 per call) (can throw external)
calls: void _ITM_cxa_throw(void*, void*, void (*)(void*))/12 (1.00
per call) (can throw external) void* _ITM_cxa_allocate_exception(long
unsigned int)/11 (1.00 per call) void* __cxa_allocate_exception(long
unsigned int)/8 (1.00 per call) void __cxa_throw(void*, void*, void
(*)(void*))/9 (1.00 per call) (can throw external)
z.c:36:1: internal compiler error: verify_cgraph_node failed
This happens because cgraph_copy_node_for_versioning duplicated all of
the callee edges from the original function, and
tree_function_versioning created new edges when copying the body of the
function instead of updating the edges we duplicated.
Frankly, the unholy mess of edge update options has me stumped. I have
no idea what's going on in this area. Why bother with any of it anyway?
Why not just always create all new callee edges when instantiating the
new body?
r~