Commit a8fc41af by Richard Kenner

(jump_optimize): Ensure operand of REG_NOTES is an INSN; otherwise, we

might try to read outside allocated memory.

From-SVN: r2684
parent b76e0b76
...@@ -837,6 +837,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) ...@@ -837,6 +837,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
&& this_is_condjump && ! this_is_simplejump && this_is_condjump && ! this_is_simplejump
&& BRANCH_COST >= 3 && BRANCH_COST >= 3
&& (temp = next_nonnote_insn (insn)) != 0 && (temp = next_nonnote_insn (insn)) != 0
&& GET_CODE (temp) == INSN
&& REG_NOTES (temp) == 0 && REG_NOTES (temp) == 0
&& (reallabelprev == temp && (reallabelprev == temp
|| ((temp2 = next_active_insn (temp)) != 0 || ((temp2 = next_active_insn (temp)) != 0
...@@ -874,8 +875,10 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) ...@@ -874,8 +875,10 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
&& this_is_condjump && ! this_is_simplejump && this_is_condjump && ! this_is_simplejump
&& BRANCH_COST >= 4 && BRANCH_COST >= 4
&& (temp = next_nonnote_insn (insn)) != 0 && (temp = next_nonnote_insn (insn)) != 0
&& GET_CODE (temp) == INSN
&& REG_NOTES (temp) == 0 && REG_NOTES (temp) == 0
&& (temp3 = next_nonnote_insn (temp)) != 0 && (temp3 = next_nonnote_insn (temp)) != 0
&& GET_CODE (temp3) == INSN
&& REG_NOTES (temp3) == 0 && REG_NOTES (temp3) == 0
&& (reallabelprev == temp3 && (reallabelprev == temp3
|| ((temp2 = next_active_insn (temp3)) != 0 || ((temp2 = next_active_insn (temp3)) != 0
...@@ -920,8 +923,10 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) ...@@ -920,8 +923,10 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
&& this_is_condjump && ! this_is_simplejump && this_is_condjump && ! this_is_simplejump
&& BRANCH_COST >= 4 && BRANCH_COST >= 4
&& (temp = next_nonnote_insn (insn)) != 0 && (temp = next_nonnote_insn (insn)) != 0
&& GET_CODE (temp) == INSN
&& REG_NOTES (temp) == 0 && REG_NOTES (temp) == 0
&& (temp3 = next_nonnote_insn (temp)) != 0 && (temp3 = next_nonnote_insn (temp)) != 0
&& GET_CODE (temp3) == INSN
&& REG_NOTES (temp3) == 0 && REG_NOTES (temp3) == 0
&& (reallabelprev == temp3 && (reallabelprev == temp3
|| ((temp2 = next_active_insn (temp3)) != 0 || ((temp2 = next_active_insn (temp3)) != 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment