This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: middle-end/10336: [3.4 regression] ICE with -Wunreachable-code
- From: Jason Merrill <jason at redhat dot com>
- To: jason at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 29 Apr 2003 17:46:00 -0000
- Subject: Re: middle-end/10336: [3.4 regression] ICE with -Wunreachable-code
- Reply-to: Jason Merrill <jason at redhat dot com>
The following reply was made to PR middle-end/10336; it has been noted by GNATS.
From: Jason Merrill <jason at redhat dot com>
To: bangerth at dealii dot org
Cc: gcc-bugs at gcc dot gnu dot org, reichelt at igpm dot rwth-aachen dot de, gcc-gnats at gcc dot gnu dot org
Subject: Re: middle-end/10336: [3.4 regression] ICE with -Wunreachable-code
Date: Tue, 29 Apr 2003 13:32:15 -0400
--=-=-=
Well, this has been an annoyingly persistent problem. :)
I'm testing this patch now:
--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline
*** jump.c.~1~ 2003-04-29 12:32:39.000000000 -0400
--- jump.c 2003-04-29 12:57:54.000000000 -0400
*************** never_reached_warning (avoided_insn, fin
*** 1912,1924 ****
/* Back up to the first of any NOTEs preceding avoided_insn; flow passes
us the head of a block, a NOTE_INSN_BASIC_BLOCK, which often follows
the line note. */
! for (insn = PREV_INSN (avoided_insn); ; insn = PREV_INSN (insn))
! if (GET_CODE (insn) != NOTE
! || NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG)
! {
! insn = NEXT_INSN (insn);
break;
! }
/* Scan forwards, looking at LINE_NUMBER notes, until we hit a LABEL
in case FINISH is NULL, otherwise until we run out of insns. */
--- 1912,1926 ----
/* Back up to the first of any NOTEs preceding avoided_insn; flow passes
us the head of a block, a NOTE_INSN_BASIC_BLOCK, which often follows
the line note. */
! insn = avoided_insn;
! while (1)
! {
! rtx prev = PREV_INSN (insn);
! if (prev == NULL_RTX
! || GET_CODE (prev) != NOTE)
break;
! insn = prev;
! }
/* Scan forwards, looking at LINE_NUMBER notes, until we hit a LABEL
in case FINISH is NULL, otherwise until we run out of insns. */
--=-=-=--