Bug 8555 - [3.2 regression] ICE in gen_split_1231
Summary: [3.2 regression] ICE in gen_split_1231
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 3.2
: P3 normal
Target Milestone: ---
Assignee: Jakub Jelinek
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2002-11-12 12:36 UTC by kris.demuynck
Modified: 2003-07-25 17:33 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
zz.c (314 bytes, text/x-c )
2003-05-21 15:17 UTC, kris.demuynck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kris.demuynck 2002-11-12 12:36:03 UTC
zz.c: In function `find_max':
zz.c:19: Internal compiler error in gen_split_1231, at insn-emit.c:16727

Release:
gcc version 3.2

Environment:
Linux, RedHat 7.1, 2.4.9-31smp kernel
Dell WS410, dual P3 450Mhz, 512MB SDRAM

How-To-Repeat:
gcc -march=pentium3 -O2 -fomit-frame-pointer -ffast-math -funroll-loops -c zz.c
Comment 1 kris.demuynck 2002-11-12 12:36:03 UTC
Fix:
1. Turning off any of the following optimization flags:
    -march=pentium3 -O2 -fomit-frame-pointer -ffast-math -funroll-loops
2. Some simple recoding; See the problem file 'zz.c' for an example
Comment 2 Volker Reichelt 2002-11-12 14:57:50 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed.
    gcc 3.1 and mainline are not affected, but gcc 3.2 and the
    3.2.1 prerelease produce an ICE.
    
    Here's a shorter example that triggers the bug (just compile with
    gcc -march=pentium3 -O -ffast-math -funroll-loops -c)
    
    -------------------------snip here-----------------------
    float foo (float *a)
    {
      int i, j;
      float x=a[j=i-1], y;
    
      for ( j=i; --j>=0; )
        if( (y=a[j]) > x )
          x = y;
    
      return x;
    }
    -------------------------snip here-----------------------
    
    Since the bug is a regression on the branch, I rate the PR "high priority".
Comment 3 janis187 2002-12-23 09:43:28 UTC
From: Janis Johnson <janis187@us.ibm.com>
To: kris.demuynck@esat.kuleuven.ac.be, gcc-gnats@gcc.gnu.org,
   gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org
Cc:  
Subject: Re: optimization/8555: [3.2 regression] ICE in gen_split_1231
Date: Mon, 23 Dec 2002 09:43:28 -0800

 The regression reported in PR optimization/8555 showed up
 starting with this patch to the 3.1 branch; it currently
 affects only the 3.2 branch.
 
 2002-05-23  Jakub Jelinek  <jakub@redhat.com>
 
         PR target/6753
         * config/i386/i386.md
 
 Here's a small test case that causes the compiler to ICE
 when compiled on i686-linux with the 3.2 branch compiler.
 
 -------------------
 // ICE when compiled with
 //   -march=pentium3 -O -ffast-math -funroll-loops
 
 float foo (float *a)
 {
   int i, j;
   float x=a[j=i-1], y;
 
   for ( j=i; --j>=0; )
     if( (y=a[j]) > x )
       x = y;
 
   return x;
 }
 -------------------
 
 Output from the 3.2 branch compiler:
 
 8555.c: In function `foo':
 8555.c:14: Internal compiler error in gen_split_1233, at
 insn-emit.c:16727
 Please submit a full bug report,
 with preprocessed source if appropriate.
 See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8555
 
 
 

Comment 4 Jakub Jelinek 2003-02-05 11:29:15 UTC
From: jakub@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: optimization/8555
Date: 5 Feb 2003 11:29:15 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	jakub@gcc.gnu.org	2003-02-05 11:29:15
 
 Modified files:
 	gcc            : ChangeLog 
 	gcc/testsuite  : ChangeLog 
 	gcc/config/i386: i386.md 
 Added files:
 	gcc/testsuite/gcc.dg: 20030204-1.c 
 
 Log message:
 	PR optimization/8555
 	* config/i386/i386.md (sse_mov?fcc split): Handle op2 == op3 case
 	instead of aborting.
 	
 	* gcc.dg/20030204-1.c: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.16627&r2=1.16628
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2395&r2=1.2396
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&r1=1.424&r2=1.425
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20030204-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
 

Comment 5 Jakub Jelinek 2003-02-05 11:30:43 UTC
From: jakub@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: optimization/8555
Date: 5 Feb 2003 11:30:43 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_2-rhl8-branch
 Changes by:	jakub@gcc.gnu.org	2003-02-05 11:30:43
 
 Modified files:
 	gcc            : ChangeLog 
 	gcc/config/i386: i386.md 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/gcc.dg: 20030204-1.c 
 
 Log message:
 	PR optimization/8555
 	* config/i386/i386.md (sse_mov?fcc split): Handle op2 == op3 case
 	instead of aborting.
 	
 	* gcc.dg/20030204-1.c: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.13152.2.657.2.27.2.66&r2=1.13152.2.657.2.27.2.67
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.339.2.13.2.1.2.10&r2=1.339.2.13.2.1.2.11
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.1672.2.166.2.8.2.26&r2=1.1672.2.166.2.8.2.27
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20030204-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=NONE&r2=1.1.2.1
 
Comment 6 Eric Botcazou 2003-03-28 22:44:33 UTC
Responsible-Changed-From-To: unassigned->jakub
Responsible-Changed-Why: Any reason why you didn't put the fix on the 3.2 branch?
Comment 7 Joe Buck 2003-04-25 21:21:47 UTC
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed for 3.3.
Comment 8 Jakub Jelinek 2003-05-20 12:46:32 UTC
From: jakub@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: optimization/8555
Date: 20 May 2003 12:46:32 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_3-rhl-branch
 Changes by:	jakub@gcc.gnu.org	2003-05-20 12:46:32
 
 Modified files:
 	gcc            : ChangeLog 
 	gcc/config/i386: i386.md 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/gcc.dg: 20030204-1.c 
 
 Log message:
 	PR optimization/8555
 	* config/i386/i386.md (sse_mov?fcc split): Handle op2 == op3 case
 	instead of aborting.
 	
 	* gcc.dg/20030204-1.c: New test.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.16114.2.523.2.8&r2=1.16114.2.523.2.9
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.404.2.14&r2=1.404.2.14.4.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.2261.2.170&r2=1.2261.2.170.2.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20030204-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=NONE&r2=1.1.16.1
Comment 9 CVS Commits 2005-01-23 05:16:36 UTC
Subject: Bug 8555

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	sayle@gcc.gnu.org	2005-01-23 05:16:15

Modified files:
	gcc            : ChangeLog 
	gcc/config/i386: i386.md 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: 20030204-1.c 

Log message:
	PR target/18402
	Backport from mainline
	2003-02-05  Jakub Jelinek  <jakub@redhat.com>
	
	PR optimization/8555
	* config/i386/i386.md (sse_mov?fcc split): Handle op2 == op3 case
	instead of aborting.
	
	* gcc.dg/20030204-1.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.1055&r2=1.16114.2.1056
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.404.2.28&r2=1.404.2.29
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.397&r2=1.2261.2.398
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20030204-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.3.6.1