Bug 9331 - ICE in final_scan_finsn
Summary: ICE in final_scan_finsn
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 3.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2003-01-15 10:56 UTC by Marc Mutz
Modified: 2004-12-08 21:37 UTC (History)
4 users (show)

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


Attachments
vtkImageLogic.ii.bz2 (84.07 KB, application/octet-stream)
2003-05-21 15:17 UTC, Marc Mutz
Details
preprocessed source from an x86_64 system (103.02 KB, application/octet-stream)
2004-12-08 21:34 UTC, laa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Mutz 2003-01-15 10:56:00 UTC
While trying to compile a nightly VTK snapshot:

g++ -O2 -march=pentium3 -msse -g -Wno-deprecated \
 -I/usr/X11R6/include -DvtkImaging_EXPORTS  -fPIC \
 -I/home/mmutz/ITK/VTK/Imaging -I/home/mmutz/ITK/vtkbuild \
 -I/home/mmutz/ITK/VTK/Parallel -I/home/mmutz/ITK/VTK/Hybrid \
 -I/home/mmutz/ITK/VTK/Patented \
 -I/home/mmutz/ITK/VTK/Rendering -I/home/mmutz/ITK/VTK/IO \
 -I/home/mmutz/ITK/VTK/Imaging -I/home/mmutz/ITK/VTK/Graphics \
 -I/home/mmutz/ITK/VTK/Filtering -I/home/mmutz/ITK/VTK/Common \
 -I/home/mmutz/ITK/VTK/Common/Testing/Cxx \
 -I/home/mmutz/ITK/vtkbuild/Utilities/jpeg \
 -I/home/mmutz/ITK/VTK/Utilities/jpeg \
 -I/home/mmutz/ITK/vtkbuild/Utilities/tiff \
 -I/home/mmutz/ITK/VTK/Utilities/tiff \
 -I/home/mmutz/ITK/vtkbuild/Utilities/expat \
 -I/home/mmutz/ITK/VTK/Utilities/expat \
 -I/home/mmutz/ITK/vtkbuild/Utilities/png \
 -I/home/mmutz/ITK/VTK/Utilities/png \
 -I/home/mmutz/ITK/vtkbuild/Utilities/zlib 
 -I/home/mmutz/ITK/VTK/Utilities/zlib \
 -I/home/mmutz/ITK/VTK/Utilities/freetype/include \
 -I/home/mmutz/ITK/vtkbuild/Utilities/freetype \
 -I/home/mmutz/ITK/VTK/Utilities/ftgl/src \
 -I/home/mmutz/ITK/vtkbuild/Utilities/ftgl \
  -c  /home/mmutz/ITK/VTK/Imaging/vtkImageLogic.cxx \
 -o vtkImageLogic.o 
/home/mmutz/ITK/VTK/Imaging/vtkImageLogic.cxx: In function `void vtkImageLogicExecute1(vtkImageLogic*, vtkImageData*, vtkImageData*, int*, int, T*) [with T = VTK_TT]':
/home/mmutz/ITK/VTK/Imaging/vtkImageLogic.cxx:240:   instantiated from here
/home/mmutz/ITK/VTK/Imaging/vtkImageLogic.cxx:91: could not split insn
(insn:TI 422 478 296 (set (reg:SF 21 exmm0 [100])
        (if_then_else:SF (ne (mem:SF (reg/v/f:SI 1 edx [77]) [46 S4 A32])
                (reg:SF 21 exmm0 [100]))
            (reg:SF 23 exmm2)
            (const_double:SF 0 [0x0] 0 [0x0] 0 [0x0] 0 [0x0] 0 [0x0]))) 643 {*sse_movsfcc_const0_3} (insn_list 481 (insn_list 478 (nil)))
    (expr_list:REG_DEAD (reg:SF 23 exmm2)
        (expr_list:REG_EQUIV (mem:SF (reg/v/f:SI 0 eax [80]) [46 S4 A32])
            (nil))))
/home/mmutz/ITK/VTK/Imaging/vtkImageLogic.cxx:91: Internal compiler error in final_scan_insn, at final.c:2622
Please submit a full bug report,
with preprocessed source if appropriate.

----
$ g++ -v
Reading specs from /usr//bin/../lib/gcc-lib/i586-mandrake-linux-gnu/3.2/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --enable-long-long --enable-__cxa_atexit --enable-languages=c,c++,ada,f77,objc,java --host=i586-mandrake-linux-gnu --with-system-zlib
Thread model: posix
gcc version 3.2 (Mandrake Linux 9.0 3.2-1mdk)

----
Preprocessed source is in vtkImageLogic.ii. More examples are
available on request or via nightly snapshots from VTK:
  http://www.vtk.org/files/nightly/vtkNightlySrc.tar.gz
These two files give this internal compiler error:

Imaging/vtkImageEuclideanDistance.cxx
Imaging/vtkImageLogic.cxx

----
Option combinations tried:
-march=pentium -O2 : OK
-march=pentiumpro -O2 : OK
-march=pentium3 -O : Error
-march=pentium3 -O2 : Error
-march=pentium3 : OK
-O2 : OK
-march=pentium4 -O2 : Error
-march=athlon -O2 : OK
-march=athlon-xp -O2 : Error
-march=pentium3 -O2 -mno-sse : OK
-march=pentium3 -O2 -msse : Error

Release:
gcc version 3.2 (Mandrake Linux 9.0 3.2-1mdk)

Environment:
Mandrake Linux 9.0: Linux kernel: 2.4.19-16mdk
$ g++ -v
Reading specs from /usr//bin/../lib/gcc-lib/i586-mandrake-linux-gnu/3.2/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --enable-long-long --enable-__cxa_atexit --enable-languages=c,c++,ada,f77,objc,java --host=i586-mandrake-linux-gnu --with-system-zlib
Thread model: posix
gcc version 3.2 (Mandrake Linux 9.0 3.2-1mdk)

How-To-Repeat:
g++ -O -msse -o foo.o -c vtkImageLogic.ii
Comment 1 Marc Mutz 2003-01-15 10:56:00 UTC
Fix:
Use -mno-sse.
Comment 2 Wolfgang Bangerth 2003-01-15 11:30:16 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed. Here's a much reduced testcase:
    ----------------------------
    void foo() {
      float trueValue;
      float* outSI;
    
      if (*outSI)
        *outSI = trueValue;
      else
        *outSI = 0;
    }
    ----------------------------
    It crashed the C and C++ front ends of 3.2/3/4 branches
    alike:
    
    g/a> /home/bangerth/bin/gcc-3.4-pre/bin/gcc -march=pentium3 -O -c x.c
    x.c: In function `foo':
    x.c:9: error: could not split insn
    (insn 34 11 35 0x4001839c (set (reg:SF 21 exmm0 [62])
            (if_then_else:SF (ne (mem:SF (reg/v/f:SI 0 eax [59]) [0 S4 A32])
                    (reg:SF 21 exmm0 [61]))
                (reg/v:SF 22 exmm1 [58])
                (const_double:SF 0 [0x0] 0.0 [0x0.0p+0]))) 495 {*sse_movsfcc_const0_3} (insn_list 11 (nil))
        (expr_list:REG_DEAD (reg/v:SF 22 exmm1 [58])
            (expr_list:REG_EQUIV (mem:SF (reg/v/f:SI 0 eax [59]) [0 S4 A32])
                (nil))))
    x.c:9: internal compiler error: in final_scan_insn, at final.c:2495
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
    
    
    W.
Comment 3 Dara Hazeghi 2003-05-09 22:33:00 UTC
From: Dara Hazeghi <dhazeghi@yahoo.com>
To: mutz@kde.org, gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: optimization/9331: ICE in final_scan_finsn
Date: Fri, 9 May 2003 22:33:00 -0700

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- 
 trail&database=gcc&pr=9331
 
 Hello,
 
 I can confirm that this bug occurs on gcc 3.2.3, but on gcc 3.3 branch  
 and mainline (20030509) I get no ICE in the testcase with -O3 -msse.  
 Would it be possible for the submitter of this bug to verify whether  
 the bug still exists for them?
 
 Dara
 
Comment 4 Dara Hazeghi 2003-05-12 10:17:42 UTC
From: Dara Hazeghi <dhazeghi@yahoo.com>
To: mutz@kde.org, gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: optimization/9331: ICE in final_scan_finsn
Date: Mon, 12 May 2003 10:17:42 -0700

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- 
 trail&database=gcc&pr=9331
 
 Hello,
 
 well judging as how this can't be reproduced on either active gcc  
 branch (3.2 is now closed), I'd vote to close this bug, but if you have  
 a reason to keep it open, feel free to say so.
 
 Dara
Comment 5 Giovanni Bajo 2003-05-12 11:38:26 UTC
State-Changed-From-To: analyzed->feedback
State-Changed-Why: See Dara's question.
Comment 6 Wolfgang Bangerth 2003-05-12 15:37:46 UTC
State-Changed-From-To: feedback->closed
State-Changed-Why: Fixed in 3.3 and 3.4
Comment 7 Marc Mutz 2003-05-12 16:59:05 UTC
From: Marc Mutz <mutz@kde.org>
To: gcc-prs@gcc.gnu.org, mutz@kde.org, gcc-bugs@gcc.gnu.org,
	gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org
Cc:  
Subject: Re: optimization/9331: ICE in final_scan_finsn
Date: Mon, 12 May 2003 16:59:05 +0200

 <snip>
 >  Would it be possible for the submitter of this bug to verify whether  
 >  the bug still exists for them?
 <snip>
 
 I'm sorry, but I don't have a spare system to play with newer gcc 
 versions. I know this is not what you expect from a bug reporter (I 
 won't, too).
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9331
 
 -- 
 I am Bush of USA. You will be pacified. Resistance is futile.
Comment 8 GCC Commits 2004-07-11 16:48:31 UTC
Subject: Bug 9331

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mark@gcc.gnu.org	2004-07-11 16:48:29

Modified files:
	libjava        : ChangeLog 
	libjava/java/net: URLStreamHandler.java 

Log message:
	Reported by Roman Kennke <roman@ontographics.com> (bug #9331)
	* java/net/URLStreamHandler.java (parseURL): When url file part
	doesn't contain a '/' just ignore context.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.2920&r2=1.2921
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/net/URLStreamHandler.java.diff?cvsroot=gcc&r1=1.30&r2=1.31

Comment 9 laa 2004-12-08 21:34:54 UTC
Created attachment 7708 [details]
preprocessed source from an x86_64 system
Comment 10 laa 2004-12-08 21:37:13 UTC
I'm having a problem very similar to this one on an x86_64 system, but only with 'g++ -m64', and not 
with -O0. Here are the details:

> gcc --version
gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-34)

> uname -a
Linux dq002.viz.acl.lanl.gov 2.4.21-15.EL #1 SMP Thu Apr 22 00:09:47 EDT 2004 x86_64 x86_64 
x86_64 GNU/Linux

/usr/bin/g++ -o vtkImageLogic.o   -Wno-deprecated  -O2 -I/usr/local/paraview/Dashboards/
MyTests/dq/zRel18-LinuxDQ-gcc-none-Release -I/usr/local/paraview/Dashboards/MyTests/dq/
zRel18-LinuxDQ-gcc-none-Release/VTK -I/usr/local/paraview/Dashboards/MyTests/dq/zRel18-
LinuxDQ-gcc-none-Release/VTK/Utilities -I/usr/local/paraview/Dashboards/MyTests/ParaView-1-8/
VTK/Parallel -I/usr/local/paraview/Dashboards/MyTests/ParaView-1-8/VTK/Hybrid -I/usr/local/
paraview/Dashboards/MyTests/ParaView-1-8/VTK/Patented -I/usr/local/paraview/Dashboards/
MyTests/ParaView-1-8/VTK/Rendering -I/usr/local/paraview/Dashboards/MyTests/ParaView-1-8/
VTK/IO -I/usr/local/paraview/Dashboards/MyTests/ParaView-1-8/VTK/Imaging -I/usr/local/
paraview/Dashboards/MyTests/ParaView-1-8/VTK/Graphics -I/usr/local/paraview/Dashboards/
MyTests/ParaView-1-8/VTK/GenericFiltering -I/usr/local/paraview/Dashboards/MyTests/ParaView-1
-8/VTK/Filtering -I/usr/local/paraview/Dashboards/MyTests/ParaView-1-8/VTK/Common -I/usr/
local/paraview/Dashboards/MyTests/ParaView-1-8/VTK/Utilities -I/usr/local/paraview/Dashboards/
MyTests/ParaView-1-8/VTK/Common/Testing/Cxx -I/usr/local/paraview/Dashboards/MyTests/dq/
zRel18-LinuxDQ-gcc-none-Release/VTK/Utilities/DICOMParser -I/usr/local/paraview/Dashboards/
MyTests/ParaView-1-8/VTK/Utilities/DICOMParser -I/usr/local/paraview/Dashboards/MyTests/dq/
zRel18-LinuxDQ-gcc-none-Release/VTK/Utilities/freetype/include -I/usr/local/paraview/Dashboards/
MyTests/ParaView-1-8/VTK/Utilities/freetype/include -I/usr/local/paraview/Dashboards/MyTests/dq/
zRel18-LinuxDQ-gcc-none-Release/VTK/Utilities/freetype -I/usr/local/paraview/Dashboards/
MyTests/ParaView-1-8/VTK/Utilities/ftgl/src -I/usr/local/paraview/Dashboards/MyTests/dq/zRel18-
LinuxDQ-gcc-none-Release/VTK/Utilities/ftgl -I/usr/share/doc/NVIDIA_GLX-1.0/include -I/usr/
X11R6/include   -DVTK_PYTHON_BUILD -DVTK_LEAN_AND_MEAN  -c /usr/local/paraview/Dashboards/
MyTests/ParaView-1-8/VTK/Imaging/vtkImageLogic.cxx
/usr/local/paraview/Dashboards/MyTests/ParaView-1-8/VTK/Imaging/vtkImageLogic.cxx: In
   function `void vtkImageLogicExecute1(vtkImageLogic*, vtkImageData*, 
   vtkImageData*, int*, int, T*) [with T = VTK_TT]':
/usr/local/paraview/Dashboards/MyTests/ParaView-1-8/VTK/Imaging/vtkImageLogic.cxx:242:   
instantiated from here
/usr/local/paraview/Dashboards/MyTests/ParaView-1-8/VTK/Imaging/vtkImageLogic.cxx:90: could
   not split insn
(insn:TI 465 512 468 (set (reg:DF 21 rxmm0 [102])
        (if_then_else:DF (ne (mem:DF (reg/v/f:DI 1 rdx [79]) [25 S8 A64])
                (reg:DF 21 rxmm0 [102]))
            (reg:DF 23 rxmm2)
            (const_double:DF 0 [0x0] 0 [0x0] 0 [0x0]))) 660 {*sse_movdfcc_const0_3} (insn_list 515 
(insn_list 512 (nil)))
    (expr_list:REG_DEAD (reg:DF 23 rxmm2)
        (expr_list:REG_EQUIV (mem:DF (reg/v/f:DI 0 rax [82]) [25 S8 A64])
            (nil))))
/usr/local/paraview/Dashboards/MyTests/ParaView-1-8/VTK/Imaging/vtkImageLogic.cxx:90: Internal
   compiler error in final_scan_insn, at final.c:2624
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.