summaryrefslogtreecommitdiff
path: root/gcc/jump.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2003-04-15 12:13:14 -0400
committerJason Merrill <jason@gcc.gnu.org>2003-04-15 12:13:14 -0400
commit9547e8fd98c50f8e01cb5d92109a5c7ed6b862dd (patch)
treef4d3141cda679bb35bf11e4ca06050cea09a777d /gcc/jump.c
parent55adc7bd57e426ac615874ce723406e11f341388 (diff)
downloadgcc-9547e8fd98c50f8e01cb5d92109a5c7ed6b862dd.tar.gz
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: r65637
Diffstat (limited to 'gcc/jump.c')
-rw-r--r--gcc/jump.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/jump.c b/gcc/jump.c
index b48bc6b0347..5563ee34581 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -1913,7 +1913,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;