diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-02-25 11:41:52 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-02-25 11:41:52 +0100 |
commit | 7d5d39bb9dbdf4374f8240128048302338faaca7 (patch) | |
tree | 5246e3d3be5b91effeda301f47ee217ba7e1b8a8 /gcc/cfgexpand.c | |
parent | f205d1da0f39deccade0353a5765d86239f324ba (diff) | |
download | gcc-7d5d39bb9dbdf4374f8240128048302338faaca7.zip gcc-7d5d39bb9dbdf4374f8240128048302338faaca7.tar.gz gcc-7d5d39bb9dbdf4374f8240128048302338faaca7.tar.bz2 |
re PR debug/43165 (ice in simplify_subreg, at simplify-rtx.c:5146)
PR debug/43165
* cfgexpand.c (expand_debug_expr): Don't call simplify_gen_subreg
if bitpos isn't multiple of mode's bitsize.
* gcc.dg/torture/pr43165.c: New test.
From-SVN: r157062
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index f5677a3..e60df87 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -2538,8 +2538,9 @@ expand_debug_expr (tree exp) if (bitpos >= GET_MODE_BITSIZE (opmode)) return NULL; - return simplify_gen_subreg (mode, op0, opmode, - bitpos / BITS_PER_UNIT); + if ((bitpos % GET_MODE_BITSIZE (mode)) == 0) + return simplify_gen_subreg (mode, op0, opmode, + bitpos / BITS_PER_UNIT); } return simplify_gen_ternary (SCALAR_INT_MODE_P (GET_MODE (op0)) |