Commit 8f778593 by Jan Hubicka Committed by Jan Hubicka

* simplify-rtx.c (simplify_subreg): Avoid creating of incorrect subregs.

From-SVN: r42212
parent b2040e7b
Thu May 17 19:40:03 CEST 2001 Jan Hubicka <jh@suse.cz>
* simplify-rtx.c (simplify_subreg): Avoid creating of incorrect subregs.
2001-05-17 Bernd Schmidt <bernds@redhat.com>
* expr.c (protect_from_queue): Protect against subsequent calls to
......
......@@ -2331,6 +2331,10 @@ simplify_subreg (outermode, op, innermode, byte)
% UNITS_PER_WORD));
}
/* Bail out in case resulting subreg would be incorrect. */
if (final_offset % GET_MODE_SIZE (outermode)
|| final_offset >= GET_MODE_SIZE (innermostmode))
return NULL;
/* Recurse for futher possible simplifications. */
new = simplify_subreg (outermode, SUBREG_REG (op),
GET_MODE (SUBREG_REG (op)),
......
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