From: Jason Merrill Date: Tue, 15 Apr 2003 16:16:44 +0000 (-0400) Subject: PR middle-end/10336, c++/10401 X-Git-Tag: releases/gcc-3.2.3~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28e8cf6d61b0005b1349c80487fe758154ab4e51;p=thirdparty%2Fgcc.git PR middle-end/10336, c++/10401 PR middle-end/10336, c++/10401 * jump.c (never_reached_warning): Also stop looking if we reach the beginning of the function. From-SVN: r65639 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1536259a08b2..2c9ce2d8078f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-04-15 Jason Merrill + + PR middle-end/10336, c++/10401 + * jump.c (never_reached_warning): Also stop looking if we reach the + beginning of the function. + 2003-04-14 Hans-Peter Nilsson PR target/10377 diff --git a/gcc/jump.c b/gcc/jump.c index 9d272e8bc5cd..c668374af879 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -1958,7 +1958,8 @@ never_reached_warning (avoided_insn, finish) 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) + if (GET_CODE (insn) != NOTE + || NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG) { insn = NEXT_INSN (insn); break;