[Bug 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

patrick.marlier at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Nov 18 22:58:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51211

--- Comment #2 from Patrick Marlier <patrick.marlier at gmail dot com> 2011-11-18 22:52:44 UTC ---
After looking at it. I guess the problem was in the tracer...
The tracer tries to duplicate the BB where the __transaction_atomic is.
Unfortunately this is not valid with trans-mem passes. Either duplicate all
blocks of the transaction or forbid the duplicate of the block. I choose the
second one.

Patrick Marlier.

Index: gcc/tracer.c
===================================================================
--- gcc/tracer.c        (revision 181425)
+++ gcc/tracer.c        (working copy)
@@ -90,10 +90,14 @@
 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;
+  g = last_stmt (CONST_CAST_BB (bb));
+  if (g && gimple_code (g) == GIMPLE_TRANSACTION)
+    return true;
   return false;
 }



More information about the Gcc-bugs mailing list