diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-23 19:57:42 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-23 19:57:42 +0000 |
commit | 8d8dff492b9e21560d2094645b676b952ee720ef (patch) | |
tree | b2e5aee83e61e4c8bb623f626ccb844981dd9982 /gcc/simplify-rtx.c | |
parent | b491e489e9e7b17fd080ced622f1bb06f0df98eb (diff) | |
download | ppe42-gcc-8d8dff492b9e21560d2094645b676b952ee720ef.tar.gz ppe42-gcc-8d8dff492b9e21560d2094645b676b952ee720ef.zip |
* simplify-rtx.x (simplify_subreg): When constructing a CONST_VECTOR
from individual subregs, check that each subreg has been generated
sucessfully.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55686 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index c69084f7027..d07de68d223 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -2367,10 +2367,17 @@ simplify_subreg (outermode, op, innermode, byte) int subsize = GET_MODE_UNIT_SIZE (outermode); int i, elts = GET_MODE_NUNITS (outermode); rtvec v = rtvec_alloc (elts); + rtx elt; for (i = 0; i < elts; i++, byte += subsize) { - RTVEC_ELT (v, i) = simplify_subreg (submode, op, innermode, byte); + /* This might fail, e.g. if taking a subreg from a SYMBOL_REF. */ + /* ??? It would be nice if we could actually make such subregs + on targets that allow such relocations. */ + elt = simplify_subreg (submode, op, innermode, byte); + if (! elt) + return NULL_RTX; + RTVEC_ELT (v, i) = elt; } return gen_rtx_CONST_VECTOR (outermode, v); } |