This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Question re tree-ssa-ccp.c:substitute_and_fold
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: gcc at gcc dot gnu dot org
- Date: Fri, 26 Nov 04 20:53:26 EST
- Subject: Question re tree-ssa-ccp.c:substitute_and_fold
This is PR18662, the failure of ACATS test c97114a.
This ICE's with
../../test/c97114a.adb: In function 'C97114A.T':
../../test/c97114a.adb:132: error: Statement marked for throw, but doesn't.
# VUSE <S0D.926_251>;
D.1121_112 = S0D.926.ARRAYD.924[1]{lb: 1 sz: 8}.sD.818;
Before replace_uses_in, the subscript 1 was a variable (D.1120_111).
Since flag_non_call_exceptions is true, the former statement can trap
but the latter cannot.
But because replaced_address is still zero, we don't call
maybe_clean_eh_stmt and we need to.
The patch below calls it unconditionally. That may not be correct,
though I'm not not at all sure what the correct condition is.
Suggestions?
*** tree-ssa-ccp.c 23 Nov 2004 01:27:41 -0000 2.51
--- tree-ssa-ccp.c 24 Nov 2004 14:55:10 -0000
*************** substitute_and_fold (void)
*** 583,593 ****
need to rename VDEFs. */
if (replaced_address || changed)
! {
! mark_new_vars_to_rename (stmt, vars_to_rename);
! if (maybe_clean_eh_stmt (stmt))
! tree_purge_dead_eh_edges (bb);
! }
else
modify_stmt (stmt);
}
--- 583,591 ----
need to rename VDEFs. */
if (replaced_address || changed)
! mark_new_vars_to_rename (stmt, vars_to_rename);
else
modify_stmt (stmt);
+ if (maybe_clean_eh_stmt (stmt))
+ tree_purge_dead_eh_edges (bb);
}
Note that a lot of the functions in tree-eh.c don't have the required
documentation in front of them.