[Bug debug/48159] [4.6/4.7 Regression] ICE: SIGSEGV in build2_stat (tree.c:3802) with -ftree-loop-distribution -g

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue May 10 14:37:00 GMT 2011


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aoliva at gcc dot gnu.org

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-10 14:29:32 UTC ---
First of all, it surprises me that tree-loop-distribution.c and stmts_from_loop
don't do anything special about debug stmts, I'd say stmts_from_loop should
ignore debug stmts like it ignores GIMPLE_LABELs and
generate_loops_for_partition and generate_builtin match that, the first
by keeping all DEBUG stmts in all loops and generate_builtin to just ignore
them.  Otherwise I think we risk -fcompare-debug failures.

The second problem is in generate_loops_for_partition, it wants to remove
all stmts that are not in that partition, and going in the order of stmts
queued
from stmts_from_loop, by walking the loop bbs sequentially and first going
through not marked phis, removing each of them, then going through stmts from
first to last in the bb, again removing unneeded stmts.

insert_debug_temp_for_var_def though assumes I think that within one bb stmts
are removed from the end towards beginning and that bbs are traversed during
removal in the right order according to dominator info.  Not sure what we want
to do there, perhaps reset all the debug stmts that use values set by stmts
that are not in the current partition?  Alex, any ideas?  In particular, the
problematic DEBUG stmt uses a SSA_NAME which is not in partition bitmap, whose
definition is a PHI node result again not in the partition, and where one of
the PHI arguments again uses the SSA_NAME also used in the DEBUG stmt.



More information about the Gcc-bugs mailing list