Bug 12510 - [3.3 regression] ICE in final_scan_insn
Summary: [3.3 regression] ICE in final_scan_insn
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 3.3.1
: P2 critical
Target Milestone: 3.3.2
Assignee: Eric Botcazou
URL:
Keywords: monitored
: 12565 12621 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-04 20:05 UTC by Lars Skovlund
Modified: 2003-10-15 14:37 UTC (History)
5 users (show)

See Also:
Host: i486-pc-linux-gnu
Target: i486-pc-linux-gnu
Build: i486-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2003-10-04 20:19:14


Attachments
bzip2'ed preprocessed failing source file (57.03 KB, application/octet-stream)
2003-10-04 20:06 UTC, Lars Skovlund
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Skovlund 2003-10-04 20:05:17 UTC
Compilation of the attached file fails with gcc 3.3.2. 2.95 works fine.

gcc -v yields the following output (it's the packaged version from Debian
GNU/Linux):

Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.2/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-__cxa_atexit
--enable-clocale=gnu --enable-debug --enable-java-gc=boehm
--enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.2 20030908 (Debian prerelease)

The error message reads:

lars@hydra:~/praat/fon$ gcc -DUNIX -I /usr/X11R6/include -Wimplicit
-Wreturn-type -Wunused -Wuninitialized -O -I ../sys -I ../dwsys -I ../dwtools -I
../LPC -I ../fon   -c -o ManipulationEditor.o ManipulationEditor.c
ManipulationEditor.c: In function `cb_addPitchPointAtSlice':
ManipulationEditor.c:298: internal compiler error: in final_scan_insn, at
final.c:2799
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Lars Skovlund 2003-10-04 20:06:49 UTC
Created attachment 4889 [details]
bzip2'ed preprocessed failing source file
Comment 2 Eric Botcazou 2003-10-04 20:19:14 UTC
Confirmed on the 3.3 branch, a regression from GCC 3.2.3.
Comment 3 Volker Reichelt 2003-10-05 21:03:52 UTC
Here's a reduced example that crashes on i686-pc-linux-gnu
when compiled with "-O" (it *does* compile with "-O2").

=======================================
void foo (double);

void bar (double x, double y)
{
    foo (x);
    if (y) x = y ? 0 : 1/y;
    else if (y) x = y < 1 ? 1 : y;
    else x = 1/y < 1 ? 1 : x;
    foo (x);
}
=======================================

According to Phil's regression hunter, the regression was introduced in
February:
: Search converges between 2003-02-26-3.3 (#68) and 2003-02-28-3.3 (#69).
Comment 4 Eric Botcazou 2003-10-06 06:54:22 UTC
Fixing.
Comment 5 mihai_adrian@olteniaonline.ro 2003-10-06 07:00:12 UTC
Subject: Re:  [3.3 regression] ICE in
	final_scan_insn

On Mon, 2003-10-06 at 09:54, ebotcazou at gcc dot gnu dot org wrote:
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12510
> 
> 
> ebotcazou at gcc dot gnu dot org changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>          AssignedTo|unassigned at gcc dot gnu   |ebotcazou at gcc dot gnu dot
>                    |dot org                     |org
>              Status|NEW                         |ASSIGNED
> 
> 
> ------- Additional Comments From ebotcazou at gcc dot gnu dot org  2003-10-06 06:54 -------
> Fixing.

Comment 6 Eric Botcazou 2003-10-07 20:58:25 UTC
Patch: http://gcc.gnu.org/ml/gcc-patches/2003-10/msg00538.html
Comment 7 Mark Mitchell 2003-10-08 05:21:06 UTC
I'd actually feel more comfortable with Jakub's patch since it's received a fair
amount of testing.  I'd approve a backport of his patch.  Are you willing to
test that out?
Comment 8 Eric Botcazou 2003-10-08 05:33:20 UTC
They are equivalent, but I understand your position so I'll do the backport.
Comment 9 Eric Botcazou 2003-10-09 05:01:17 UTC
Backported patch: http://gcc.gnu.org/ml/gcc-patches/2003-10/msg00636.html
Comment 10 Mark Mitchell 2003-10-09 18:50:45 UTC
Eric, please check this in and close the PR.  Thanks!
Comment 11 CVS Commits 2003-10-09 20:53:45 UTC
Subject: Bug 12510

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	ebotcazou@gcc.gnu.org	2003-10-09 20:53:40

Modified files:
	gcc            : ChangeLog toplev.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: 20031009-1.c 

Log message:
	PR optimization/12510
	Backport from mainline:
	
	2003-09-08  Jakub Jelinek  <jakub@redhat.com>
	
	* toplev.c (rest_of_compilation): Call split_all_insns before
	regstack if optimizing but not scheduling after reload.

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.775&r2=1.16114.2.776
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/toplev.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.690.2.22&r2=1.690.2.23
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.303&r2=1.2261.2.304
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20031009-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1

Comment 12 Eric Botcazou 2003-10-09 21:02:45 UTC
Backported patch applied.
Comment 13 Eric Botcazou 2003-10-10 08:57:21 UTC
*** Bug 12565 has been marked as a duplicate of this bug. ***
Comment 14 Eric Botcazou 2003-10-15 14:37:43 UTC
*** Bug 12621 has been marked as a duplicate of this bug. ***