http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46567
--- Comment #3 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2010-11-24 14:43:53 UTC --- ipa_tm_decrement_clone_counts() is dying because we are decrementing the clone count for a caller that was not marked as being in a transaction in the first place. The problem here is that in the <tmipa> pass we have a transaction containing a call that was not marked as inside of a transaction: <bb 2>: __transaction [[relaxed]] ... <bb 4>: ... std::_List_node_base::unhook (SR.31_22); <-- HERE The pass that marks calls as inside of a transaction is in examine_call_tm() which is part of the <tmlower> pass. The function unhook() above was placed inside of the transaction in the early inline pass, and inlining is one of the small IPA passes, which happen after the lowering passes. It would seem we need to run <tmlower> after early inlining, but before <tmipa>, so some sort of lowering pass between the inlining passes. Richard?