From: Jakub Jelinek Date: Fri, 11 Feb 2011 14:19:44 +0000 (+0100) Subject: re PR target/47665 (ICE in trunc_int_for_mode) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b63f974ef230d8b6fa8258ca6cd6a5be684e0a8c;p=gcc.git re PR target/47665 (ICE in trunc_int_for_mode) PR target/47665 * combine.c (make_compound_operation): Only change shifts into multiplication for SCALAR_INT_MODE_P. * gcc.target/i386/pr47665.c: New test. From-SVN: r170050 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9e8c392b340..e4ca2b6803c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-02-11 Jakub Jelinek + + PR target/47665 + * combine.c (make_compound_operation): Only change shifts into + multiplication for SCALAR_INT_MODE_P. + 2011-02-11 Rainer Orth PR testsuite/47400 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c5bf3eb787d..10e3be701c9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-02-11 Jakub Jelinek + + PR target/47665 + * gcc.target/i386/pr47665.c: New test. + 2011-02-11 Rainer Orth PR target/47629 diff --git a/gcc/testsuite/gcc.dg/pr47684.c b/gcc/testsuite/gcc.dg/pr47684.c new file mode 100644 index 00000000000..475aa1549b8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr47684.c @@ -0,0 +1,20 @@ +/* PR debug/47684 */ +/* { dg-do compile } */ +/* { dg-options "-O3 -fcompare-debug" } */ + +int in[8][4]; +int out[4]; + +void +foo (void) +{ + int sum = 1; + int i, j, k; + for (k = 0; k < 4; k++) + { + for (j = 0; j < 4; j++) + for (i = 0; i < 4; i++) + sum *= in[i + k][j]; + out[k] = sum; + } +} diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c index f744d448780..2dbd07d135a 100644 --- a/gcc/tree-predcom.c +++ b/gcc/tree-predcom.c @@ -1,5 +1,5 @@ /* Predictive commoning. - Copyright (C) 2005, 2007, 2008, 2009, 2010 + Copyright (C) 2005, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -1668,6 +1668,8 @@ single_nonlooparound_use (tree name) return NULL; } + else if (is_gimple_debug (stmt)) + continue; else if (ret != NULL) return NULL; else