public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Question re tree-ssa-ccp.c:substitute_and_fold
@ 2004-11-27  2:13 Richard Kenner
  2004-11-28 23:18 ` Diego Novillo
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Kenner @ 2004-11-27  2:13 UTC (permalink / raw)
  To: gcc

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: Question re tree-ssa-ccp.c:substitute_and_fold
@ 2004-11-28 23:27 Richard Kenner
  2004-11-28 23:53 ` Diego Novillo
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Kenner @ 2004-11-28 23:27 UTC (permalink / raw)
  To: dnovillo; +Cc: gcc

    I had to do the same thing on tree-cleanup-branch.  Similar reasons.
    You also want to unconditionally call modify_stmt in here.  So you end
    up with:

Can you to import it in from that branch?  I don't have that branch
checked out anyplace yet.  Or else just send me the ChangeLog
for it and I'll do it.

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-11-28 23:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-27  2:13 Question re tree-ssa-ccp.c:substitute_and_fold Richard Kenner
2004-11-28 23:18 ` Diego Novillo
2004-11-28 23:27 Richard Kenner
2004-11-28 23:53 ` Diego Novillo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).