From 2e85d5e290aadb0cd0c50ddfcd8ba4f58c2301e7 Mon Sep 17 00:00:00 2001 From: Patrick Marlier Date: Sat, 19 Nov 2011 19:29:18 +0000 Subject: [PATCH] re PR middle-end/51211 (ICE: SIGSEGV in execute_tm_mark (trans-mem.c:2242) with -fgnu-tm -O -freorder-blocks -ftracer --param hot-bb-frequency-fraction=1 and __transaction_atomic) PR middle-end/51211 * tracer.c (ignore_bb_p): Don't copy GIMPLE_TRANSACTION. From-SVN: r181512 --- gcc/ChangeLog | 5 +++++ gcc/tracer.c | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 69c633728f0..eb4e2122b93 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-11-19 Patrick Marlier + + PR middle-end/51211 + * tracer.c (ignore_bb_p): Don't copy GIMPLE_TRANSACTION. + 2011-11-19 Eric Botcazou * expmed.c (store_bit_field_1): Revert bogus formatting change. diff --git a/gcc/tracer.c b/gcc/tracer.c index d3523b985b1..602e7580d99 100644 --- a/gcc/tracer.c +++ b/gcc/tracer.c @@ -90,10 +90,19 @@ bb_seen_p (basic_block bb) static bool ignore_bb_p (const_basic_block bb) { + gimple g; + if (bb->index < NUM_FIXED_BLOCKS) return true; if (optimize_bb_for_size_p (bb)) return true; + + /* A transaction is a single entry multiple exit region. It must be + duplicated in its entirety or not at all. */ + g = last_stmt (CONST_CAST_BB (bb)); + if (g && gimple_code (g) == GIMPLE_TRANSACTION) + return true; + return false; } -- 2.30.2