public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner)
To: gcc@gcc.gnu.org
Subject: Question re tree-ssa-ccp.c:substitute_and_fold
Date: Sat, 27 Nov 2004 02:13:00 -0000	[thread overview]
Message-ID: <10411270153.AA15292@vlsi1.ultra.nyu.edu> (raw)

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.

             reply	other threads:[~2004-11-27  1:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-27  2:13 Richard Kenner [this message]
2004-11-28 23:18 ` Diego Novillo
2004-11-28 23:27 Richard Kenner
2004-11-28 23:53 ` Diego Novillo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10411270153.AA15292@vlsi1.ultra.nyu.edu \
    --to=kenner@vlsi1.ultra.nyu.edu \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).