aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-02-05 16:38:57 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-02-05 16:38:57 +0100
commit7356fbde50dd4bfd55eaa0bed31b31da55d1461c (patch)
tree7e1963ea7a68f515f1a35d79294711996b35c81e /gcc/combine.c
parentcff2ddc9c7ece6413e77625e58edc71b88bb58bb (diff)
downloadgcc-7356fbde50dd4bfd55eaa0bed31b31da55d1461c.zip
gcc-7356fbde50dd4bfd55eaa0bed31b31da55d1461c.tar.gz
gcc-7356fbde50dd4bfd55eaa0bed31b31da55d1461c.tar.bz2
re PR rtl-optimization/89195 (Corrupted stack offset after combine)
PR rtl-optimization/89195 * combine.c (make_extraction): For MEMs, don't extract bytes outside of the original MEM. * gcc.c-torture/execute/pr89195.c: New test. From-SVN: r268542
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 7e1992f..a249248 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -7687,6 +7687,7 @@ make_extraction (machine_mode mode, rtx inner, HOST_WIDE_INT pos,
/* We can't do this if we are widening INNER_MODE (it
may not be aligned, for one thing). */
&& !paradoxical_subreg_p (tmode, inner_mode)
+ && known_le (pos + len, GET_MODE_PRECISION (is_mode))
&& (inner_mode == tmode
|| (! mode_dependent_address_p (XEXP (inner, 0),
MEM_ADDR_SPACE (inner))