aboutsummaryrefslogtreecommitdiff
path: root/gcc/dse.c
diff options
context:
space:
mode:
authorBen Elliston <bje@gcc.gnu.org>2009-05-14 06:52:00 +1000
committerBen Elliston <bje@gcc.gnu.org>2009-05-14 06:52:00 +1000
commitefc3527addeabd8efa2c3f174e3128db32a38129 (patch)
treec2c551e6937ea7118cdf50a1e415ce155e4a3b3e /gcc/dse.c
parenta513927a5b0ea35945332ceaa78d4c1f0f74548d (diff)
downloadgcc-efc3527addeabd8efa2c3f174e3128db32a38129.zip
gcc-efc3527addeabd8efa2c3f174e3128db32a38129.tar.gz
gcc-efc3527addeabd8efa2c3f174e3128db32a38129.tar.bz2
re PR middle-end/40035 (ICE when cross-compiling with -Os)
PR middle-end/40035 * dse.c (check_mem_read_rtx): Guard against width == -1. testsuite/ * gcc.c-torture/compile/pr40035.c: New test. From-SVN: r147498
Diffstat (limited to 'gcc/dse.c')
-rw-r--r--gcc/dse.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/dse.c b/gcc/dse.c
index 5ac898c..534324d 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -2245,6 +2245,7 @@ check_mem_read_rtx (rtx *loc, void *data)
if (store_info->rhs
&& store_info->group_id == -1
&& store_info->cse_base == base
+ && width != -1
&& offset >= store_info->begin
&& offset + width <= store_info->end
&& all_positions_needed_p (store_info,