public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: c/6815: [3.2/3.3 regression] ICE with longjmp if -fprofile-arcs -O is specified
Date: Thu, 12 Dec 2002 10:16:00 -0000	[thread overview]
Message-ID: <20021212181607.1595.qmail@sources.redhat.com> (raw)

The following reply was made to PR c/6815; it has been noted by GNATS.

From: Richard Henderson <rth@redhat.com>
To: Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
Cc: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
   nobody@gcc.gnu.org, dtucker@zip.com.au
Subject: Re: c/6815: [3.2/3.3 regression] ICE with longjmp if -fprofile-arcs -O is specified
Date: Thu, 12 Dec 2002 10:08:35 -0800

 On Thu, Dec 12, 2002 at 01:37:26PM +0100, Christian Ehrhardt wrote:
 > where e is NULL. insert_insn_on_edge in turn is called from
 > flow_call_edges_add in cfganal.c:325 with this piece of code:
 > 
 > | for (e = bb->succ; e; e = e->succ_next)
 > |   if (e->dest == EXIT_BLOCK_PTR)
 > |     break;
 > |
 > | insert_insn_on_edge (gen_rtx_USE (VOIDmode, const0_rtx), e);
 > | commit_edge_insertions ();
 > 
 > which looks a bit strange if we keep in mind that insert_insn_on_edge
 > will crash if the second parameter is NULL.
 
 Indeed, this piece of code cannot handle a noreturn function
 in the last block.  The following should fix it.
 
 
 r~
 
 
 
 Index: cfganal.c
 ===================================================================
 RCS file: /cvs/gcc/gcc/gcc/cfganal.c,v
 retrieving revision 1.30
 diff -c -p -d -u -r1.30 cfganal.c
 --- cfganal.c	11 Oct 2002 21:09:59 -0000	1.30
 +++ cfganal.c	12 Dec 2002 18:07:41 -0000
 @@ -320,10 +320,11 @@ flow_call_edges_add (blocks)
  
  	  for (e = bb->succ; e; e = e->succ_next)
  	    if (e->dest == EXIT_BLOCK_PTR)
 -	      break;
 -
 -	  insert_insn_on_edge (gen_rtx_USE (VOIDmode, const0_rtx), e);
 -	  commit_edge_insertions ();
 +	      {
 +		insert_insn_on_edge (gen_rtx_USE (VOIDmode, const0_rtx), e);
 +		commit_edge_insertions ();
 +		break;
 +	      }
  	}
      }
  


             reply	other threads:[~2002-12-12 18:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-12 10:16 Richard Henderson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-01-13 21:25 reichelt
2003-01-10 12:46 Christian Ehrhardt
2002-12-12  4:46 Christian Ehrhardt

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=20021212181607.1595.qmail@sources.redhat.com \
    --to=rth@redhat.com \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@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).