diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-17 17:40:48 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-17 17:40:48 +0000 |
commit | fbd098b374abcfaa912161e7bfbe2213353c391f (patch) | |
tree | d52e05afdcdc9330a9c9b5016b521792970e08bb /gcc/simplify-rtx.c | |
parent | 735cd89dcd1a1a98b21842de56ad6550d5b19061 (diff) | |
download | gcc-fbd098b374abcfaa912161e7bfbe2213353c391f.tar.gz |
* simplify-rtx.c (simplify_subreg): Avoid creating of incorrect subregs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42212 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 44cfc3b7e32..fd1b6303768 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -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)), |