Bug 43842 - [4.6 Regression] ice in vect_create_epilog_for_reduction
Summary: [4.6 Regression] ice in vect_create_epilog_for_reduction
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: 4.6.0
Assignee: Ira Rosen
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2010-04-21 20:31 UTC by John Regehr
Modified: 2010-07-23 11:48 UTC (History)
4 users (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu
Known to work: 4.5.0
Known to fail:
Last reconfirmed: 2010-04-22 11:46:44


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Regehr 2010-04-21 20:31:29 UTC
[regehr@gamow tmp407]$ current-gcc -c -O3 small.c
small.c: In function 'int161':
small.c:19:1: internal compiler error: in vect_create_epilog_for_reduction, at tree-vect-loop.c:3451
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

[regehr@gamow tmp407]$ current-gcc -v

Using built-in specs.
COLLECT_GCC=current-gcc
COLLECT_LTO_WRAPPER=/uusoc/exports/scratch/regehr/z/compiler-install/gcc-r158618-install/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --with-libelf=/usr/local --enable-lto --prefix=/home/regehr/z/compiler-install/gcc-r158618-install --program-prefix=r158618- --enable-languages=c,c++
Thread model: posix
gcc version 4.6.0 20100421 (experimental) (GCC) 

[regehr@gamow tmp407]$ cat small.c

typedef short int int16_t;
typedef int int32_t;
typedef unsigned short int uint16_t;
typedef unsigned int uint32_t;
static int16_t
safe_rshift_func_int16_t_s_u (int16_t left, unsigned int right)
{
  return left || right >= 1 * 8 ? left : left >> right;
}

static uint32_t
safe_add_func_uint32_t_u_u (uint32_t ui1, uint16_t ui2)
{
  return ui1 + ui2;
}

int16_t g_4;
uint32_t g_9[1];
int161 (void)
{
  int32_t l_2;
  for (l_2 = -25; l_2; l_2 = safe_add_func_uint32_t_u_u (l_2, 1))
    g_9[0] ^= safe_rshift_func_int16_t_s_u (g_4, 1);
  return 0;
}
Comment 1 Richard Biener 2010-04-22 08:51:50 UTC
Confirmed.
Comment 2 H.J. Lu 2010-04-22 15:38:21 UTC
It is caused by revision 158506:

http://gcc.gnu.org/ml/gcc-cvs/2010-04/msg00612.html
Comment 3 H.J. Lu 2010-04-22 18:07:10 UTC
I think revision 158650:

http://gcc.gnu.org/ml/gcc-cvs/2010-04/msg00756.html

is the fix for this bug.
Comment 4 irar 2010-04-22 18:23:20 UTC
Subject: Bug 43842

Author: irar
Revision: 158650
Modified property: svn:log

Modified: svn:log at Thu Apr 22 18:22:54 2010
------------------------------------------------------------------------------
--- svn:log (original)
+++ svn:log Thu Apr 22 18:22:54 2010
@@ -1,5 +1,5 @@
 
-	PR tree-optimization/43482
+	PR tree-optimization/43842
 	* tree-vect-loop.c (vect_create_epilog_for_reduction): Handle 
 	loop unrolling in update of exit phis. Fix comment.
 	* tree-vect-slp.c (vect_analyze_slp): Check that there are at

Comment 5 Richard Biener 2010-07-23 11:48:06 UTC
Fixed.