aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1992-11-03 14:57:52 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1992-11-03 14:57:52 -0500
commita8fc41afdd494825e0df0225a1e60f23a43f309a (patch)
treea403d1c499f3528ec515a74786d9472381ffdfb8 /gcc
parentb76e0b7680d1e2a13af717e52475e5114208c33e (diff)
downloadgcc-a8fc41afdd494825e0df0225a1e60f23a43f309a.zip
gcc-a8fc41afdd494825e0df0225a1e60f23a43f309a.tar.gz
gcc-a8fc41afdd494825e0df0225a1e60f23a43f309a.tar.bz2
(jump_optimize): Ensure operand of REG_NOTES is an INSN; otherwise, we
might try to read outside allocated memory. From-SVN: r2684
Diffstat (limited to 'gcc')
-rw-r--r--gcc/jump.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/jump.c b/gcc/jump.c
index 63f5313..5ed2828 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -837,6 +837,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
&& this_is_condjump && ! this_is_simplejump
&& BRANCH_COST >= 3
&& (temp = next_nonnote_insn (insn)) != 0
+ && GET_CODE (temp) == INSN
&& REG_NOTES (temp) == 0
&& (reallabelprev == temp
|| ((temp2 = next_active_insn (temp)) != 0
@@ -874,8 +875,10 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
&& this_is_condjump && ! this_is_simplejump
&& BRANCH_COST >= 4
&& (temp = next_nonnote_insn (insn)) != 0
+ && GET_CODE (temp) == INSN
&& REG_NOTES (temp) == 0
&& (temp3 = next_nonnote_insn (temp)) != 0
+ && GET_CODE (temp3) == INSN
&& REG_NOTES (temp3) == 0
&& (reallabelprev == temp3
|| ((temp2 = next_active_insn (temp3)) != 0
@@ -920,8 +923,10 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
&& this_is_condjump && ! this_is_simplejump
&& BRANCH_COST >= 4
&& (temp = next_nonnote_insn (insn)) != 0
+ && GET_CODE (temp) == INSN
&& REG_NOTES (temp) == 0
&& (temp3 = next_nonnote_insn (temp)) != 0
+ && GET_CODE (temp3) == INSN
&& REG_NOTES (temp3) == 0
&& (reallabelprev == temp3
|| ((temp2 = next_active_insn (temp3)) != 0