summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1997-09-05 02:17:56 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1997-09-05 02:17:56 +0000
commit2e1d7505cf5e1e23b7ae4e992bafb944720f1a46 (patch)
tree5e88a112196e8740cec41ec1b21a62e8217591dd /gcc
parentc6afe4459e2a32558d4ad207ff2de62e3f3a7335 (diff)
downloadgcc-2e1d7505cf5e1e23b7ae4e992bafb944720f1a46.tar.gz
Fix another -fprofile-arcs bug from Joseph Myers <jsm28@cam.ac.uk>.
* profile.c (output_arc_profiler): Check next_insert_after for non NULL before deferencing it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15090 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/profile.c6
2 files changed, 7 insertions, 2 deletions
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 <wilson@cygnus.com>
+ * 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));