[Bug tree-optimization/21399] [4.1 Regression] libstdc++ 12077.cc ICE
steven at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon May 16 00:26:00 GMT 2005
------- Additional Comments From steven at gcc dot gnu dot org 2005-05-16 00:26 -------
We have this code in tree-ssa-propagate.c:1052-1065:
if (did_replace)
{
fold_stmt (bsi_stmt_ptr (i));
stmt = bsi_stmt(i);
/* If we folded a builtin function, we'll likely
need to rename VDEFs. */
mark_new_vars_to_rename (stmt);
/* If we cleaned up EH information from the statement,
remove EH edges. */
if (maybe_clean_eh_stmt (stmt))
tree_purge_dead_eh_edges (bb);
}
But maybe_clean_eh_stmt returns false. Why??
Because we replace the entire statement apparently. So we get to tree-eh.c:
Breakpoint 4, substitute_and_fold (prop_value=0xf3e3a0) at
tree-ssa-propagate.c:1054
1054 fold_stmt (bsi_stmt_ptr (i));
(gdb) p *bsi_stmt_ptr(i)
$12 = 0x2a95896550
(gdb) p debug_generic_stmt (*bsi_stmt_ptr(i))
# TMT.1D.2025_4 = V_MAY_DEF <TMT.1D.2025_3>;
fputs (&"a"[0], fileD.2015_2);
$13 = void
(gdb) cont
Continuing.
Breakpoint 3, substitute_and_fold (prop_value=0xf3e3a0) at
tree-ssa-propagate.c:1063
1063 if (maybe_clean_eh_stmt (stmt))
(gdb) p stmt
$14 = 0x2a95896d70
1063 if (maybe_clean_eh_stmt (stmt))
(gdb) p debug_generic_stmt(stmt)
# TMT.1D.2025_4 = V_MAY_DEF <TMT.1D.2025_3>;
__builtin_fputc (97, fileD.2015_2);
$8 = void
(gdb) step
maybe_clean_eh_stmt (stmt=0x2a95896d70) at tree-eh.c:2040
2040 if (!tree_could_throw_p (stmt))
(gdb) next
2041 if (remove_stmt_from_eh_region (stmt))
(gdb)
2043 return false;
(gdb)
So we try to remove the _new_ statement from the EH region, and leave the
old one right there.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21399
More information about the Gcc-bugs
mailing list