]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR middle-end/10336, c++/10401
authorJason Merrill <jason@redhat.com>
Tue, 15 Apr 2003 16:16:44 +0000 (12:16 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 15 Apr 2003 16:16:44 +0000 (12:16 -0400)
        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

gcc/ChangeLog
gcc/jump.c

index 1536259a08b275e454cdb12d58c6430f0fb7f9b2..2c9ce2d8078ffdc81299c84d409789bb279e34e1 100644 (file)
@@ -1,3 +1,9 @@
+2003-04-15  Jason Merrill  <jason@redhat.com>
+
+       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  <hp@axis.com>
 
        PR target/10377
index 9d272e8bc5cddfbe8f4cdcbea85667f39221d6b0..c668374af879ceda197c0190e9c1150a08b33112 100644 (file)
@@ -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;