From: Jim Wilson Date: Fri, 5 Sep 1997 02:17:56 +0000 (+0000) Subject: Fix another -fprofile-arcs bug from Joseph Myers . X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f4da78811e4cfecc28779c94a861c305b6ac078d;p=gcc.git Fix another -fprofile-arcs bug from Joseph Myers . * profile.c (output_arc_profiler): Check next_insert_after for non NULL before deferencing it. From-SVN: r15090 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 430ecb1a444..039e4081693 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ Thu Sep 4 15:02:27 1997 Jim Wilson + * profile.c (output_arc_profiler): Check next_insert_after for non + NULL before deferencing it. + * i386/t-sol2 (TARGET_LIBGCC2_CFLAGS): Define to -fPIC. Thu Sep 4 14:51:57 1997 Jeffrey A Law (law@cygnus.com) diff --git a/gcc/profile.c b/gcc/profile.c index 5360090ee84..b2b65b598ac 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -1537,12 +1537,14 @@ output_arc_profiler (arcno, insert_after) rtx next_insert_after = next_nonnote_insn (insert_after); /* The first insn after the call may be a stack pop, skip it. */ - if (GET_CODE (next_insert_after) == INSN + if (next_insert_after + && GET_CODE (next_insert_after) == INSN && GET_CODE (PATTERN (next_insert_after)) == SET && SET_DEST (PATTERN (next_insert_after)) == stack_pointer_rtx) next_insert_after = next_nonnote_insn (next_insert_after); - if (GET_CODE (next_insert_after) == INSN) + if (next_insert_after + && GET_CODE (next_insert_after) == INSN) { if (GET_CODE (PATTERN (insert_after)) == SET) return_reg = SET_DEST (PATTERN (insert_after));