Bug 10983 - [3.4 regression] [SPARC64] ICE in verify_wide_reg, at flow.c:551, while compiling libjava
Summary: [3.4 regression] [SPARC64] ICE in verify_wide_reg, at flow.c:551, while compi...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 3.4.0
: P2 critical
Target Milestone: 3.4.0
Assignee: Eric Botcazou
URL:
Keywords:
: 11140 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-05-26 16:45 UTC by Christian Joensson
Modified: 2004-01-17 04:22 UTC (History)
3 users (show)

See Also:
Host: sparc64-*-*
Target: sparc64-*.*
Build: sparc64-*-*
Known to work:
Known to fail:
Last reconfirmed: 2003-06-10 12:28:28


Attachments
Compressed pre-processed file natFloat.ii (51.52 KB, application/octet-stream)
2003-05-26 16:49 UTC, Christian Joensson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Joensson 2003-05-26 16:45:07 UTC
Aurora SPARC Linux 1.0 (Ansel) Ultra1 single UltraSparc I sun4u:
 
binutils 2.14.90 20030520 sparc64-linux
bison-1.35-1
dejagnu-1.4.2-10 (ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS)
expect-5.32.2-67
gcc 3.3 sparc64-linux
glibc-2.2.5-42
glibc-kernheaders-2.4-7.16sparc
glibc64-2.2.5-42
kernel-2.4.20-3.4sparc (ftp://auroralinux.org/pub/aurora/corona/RPMS)
tcl-8.3.3-67

LAST_UPDATED: Sun May 25 17:07:04 UTC 2003

configure: --prefix=/usr/local/gcc-binutils --enable-__cxa_atexit
--enable-shared --enable-threads=posix

/bin/sh ./libtool --tag=CXX --mode=compile
/usr/local/src/gcc-binutils/trunk/objdir/gcc/xgcc -shared-libgcc
-B/usr/local/src/gcc-binutils/trunk/objdir/gcc/ -nostdinc++ 
-L/usr/local/src/gcc-binutils/trunk/objdir/sparc64-unknown-linux-gnu/libstdc++-v3/src
-L/usr/local/src/gcc-binutils/trunk/objdir/sparc64-unknown-linux-gnu/libstdc++-v3/src/.libs
-B/usr/local/gcc-binutils/sparc64-unknown-linux-gnu/bin/
-B/usr/local/gcc-binutils/sparc64-unknown-linux-gnu/lib/ -isystem
/usr/local/gcc-binutils/sparc64-unknown-linux-gnu/include -isystem
/usr/local/gcc-binutils/sparc64-unknown-linux-gnu/sys-include
-L/usr/local/src/gcc-binutils/trunk/objdir/ld -DHAVE_CONFIG_H -I.
-I/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava -I./include -I./gcj
-I/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava -Iinclude
-I/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava/include
-I/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava/../boehm-gc/include 
-DGC_LINUX_THREADS=1 -D_REENTRANT=1 -DSILENT=1 -DNO_SIGNALS=1
-DNO_EXECUTE_PERMISSION=1 -DALL_INTERIOR_POINTERS=1 -DJAVA_FINALIZATION=1
-DGC_GCJ_SUPPORT=1 -DATOMIC_UNCOLLECTABLE=1  
-I/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava/libltdl
-I/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava/libltdl 
-I/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava/.././libjava/../gcc
-I/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava/../zlib
-I/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava/../libffi/include
-I../libffi/include  -O2 -g -O2 -fno-rtti -fnon-call-exceptions
-fdollars-in-identifiers -Wswitch-enum -I/usr/X11R6/include -W -Wall
-D_GNU_SOURCE -DPREFIX="\"/usr/local/gcc-binutils\""
-DLIBDIR="\"/usr/local/gcc-binutils/lib\"" -g -O2 -D_GNU_SOURCE -MD -MT
java/lang/natFloat.lo -MF java/lang/natFloat.pp -c -o java/lang/natFloat.lo
/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava/java/lang/natFloat.cc
/usr/local/src/gcc-binutils/trunk/objdir/gcc/xgcc -shared-libgcc
-B/usr/local/src/gcc-binutils/trunk/objdir/gcc/ -nostdinc++
-L/usr/local/src/gcc-binutils/trunk/objdir/sparc64-unknown-linux-gnu/libstdc++-v3/src
-L/usr/local/src/gcc-binutils/trunk/objdir/sparc64-unknown-linux-gnu/libstdc++-v3/src/.libs
-B/usr/local/gcc-binutils/sparc64-unknown-linux-gnu/bin/
-B/usr/local/gcc-binutils/sparc64-unknown-linux-gnu/lib/ -isystem
/usr/local/gcc-binutils/sparc64-unknown-linux-gnu/include -isystem
/usr/local/gcc-binutils/sparc64-unknown-linux-gnu/sys-include
-L/usr/local/src/gcc-binutils/trunk/objdir/ld -DHAVE_CONFIG_H -I.
-I/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava -I./include -I./gcj
-I/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava -Iinclude
-I/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava/include
-I/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava/../boehm-gc/include
-DGC_LINUX_THREADS=1 -D_REENTRANT=1 -DSILENT=1 -DNO_SIGNALS=1
-DNO_EXECUTE_PERMISSION=1 -DALL_INTERIOR_POINTERS=1 -DJAVA_FINALIZATION=1
-DGC_GCJ_SUPPORT=1 -DATOMIC_UNCOLLECTABLE=1
-I/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava/libltdl
-I/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava/libltdl
-I/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava/.././libjava/../gcc
-I/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava/../zlib
-I/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava/../libffi/include
-I../libffi/include -O2 -g -O2 -fno-rtti -fnon-call-exceptions
-fdollars-in-identifiers -Wswitch-enum -I/usr/X11R6/include -W -Wall
-D_GNU_SOURCE -DPREFIX=\"/usr/local/gcc-binutils\"
-DLIBDIR=\"/usr/local/gcc-binutils/lib\" -g -O2 -D_GNU_SOURCE -MD -MT
java/lang/natFloat.lo -MF java/lang/natFloat.pp -c
/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava/java/lang/natFloat.cc 
-fPIC -DPIC -o java/lang/.libs/natFloat.o
/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava/java/lang/natFloat.cc: In
   static member function `static jint 
   java::lang::Float::floatToRawIntBits(__java_float)':
/usr/local/src/gcc-binutils/trunk/gcc-binutils/libjava/java/lang/natFloat.cc:42:
internal compiler error: in
   verify_wide_reg, at flow.c:552
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[3]: *** [java/lang/natFloat.lo] Error 1
make[3]: Leaving directory
`/usr/local/src/gcc-binutils/trunk/objdir/sparc64-unknown-linux-gnu/libjava'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/usr/local/src/gcc-binutils/trunk/objdir/sparc64-unknown-linux-gnu/libjava'
make[1]: *** [all-target-libjava] Error 2
make[1]: Leaving directory `/usr/local/src/gcc-binutils/trunk/objdir'
make: *** [bootstrap-lean] Error 2
Comment 1 Christian Joensson 2003-05-26 16:49:00 UTC
Created attachment 4081 [details]
Compressed pre-processed file natFloat.ii
Comment 2 Dara Hazeghi 2003-05-26 17:53:04 UTC
Hello,

I can confirm that this testcase also ICEs on gcc mainline (20030509), so this bug has been 
present for a bit. It does not have any problems compiling with gcc 3.3 branch (20030509).

Dara
Comment 3 Christian Joensson 2003-05-26 18:16:18 UTC
I had a "report" on it here (2003-05-08)
http://gcc.gnu.org/ml/gcc/2003-05/msg00988.html
and Brad Lucier claimed the problem for sparc-solaris2.8 (2003-05-05?)
http://gcc.gnu.org/ml/gcc/2003-05/msg00405.html.

I think I first mentioned it here (2003-04-21)
http://gcc.gnu.org/ml/http://gcc.gnu.org/ml/gcc/2003-04/msg01039.html
and Andreas Tobler confirms the problem (2003-04-25) with native as/ld with
multilib enabled for solaris2.9 *with* multilib enabled, works with multilib
disabled he claimed.

I think Kaveh's (2003-04-19) http://gcc.gnu.org/ml/gcc/2003-04/msg00951.html is
  related and he seems to claim the problem entered gcc cvs HEAD after
2003-04-16 with wich he reported
http://gcc.gnu.org/ml/gcc-testresults/2003-04/msg01030.html

Comment 4 Christian Joensson 2003-06-08 14:24:48 UTC
well, the problem is still present for gcc 3.4 (cvs HEAD) LAST_UPDATED: Sat Jun
 7 19:36:01 UTC 2003... does anyone have any suggestions on what to dig up further?
Comment 5 Giovanni Bajo 2003-06-10 10:35:53 UTC
Christian,

it helps if you reduce the testcase to a bare minimum that still segfaults 
(http://gcc.gnu.org/bugs/minimize.html), and/or you can do a regression hunt to 
find out the patch that caused the regression 
(http://gcc.gnu.org/bugs/reghunt.html).

If you do both, there are good chances that your bug will get fixed in a decent 
amount of time.
Comment 6 Eric Botcazou 2003-06-10 12:27:38 UTC
I should have looked into this one far earlier...
Comment 7 Eric Botcazou 2003-06-11 08:52:18 UTC
The source of the problem has been identified:

2003-04-16  J"orn Rennecke <joern.rennecke@superh.com>

        Re-apply this patch:

        2002-05-16  Dale Johannesen  <dalej@apple.com>
          * combine.c (cant_combine_insn_p):  Reenable combinations
          involving hard regs unless CLASS_LIKELY_SPILLED_P.

http://gcc.gnu.org/ml/gcc-cvs/2003-04/msg00786.html
Comment 8 Krisztian Mark Szentes 2003-06-13 08:27:13 UTC
I seem to have this verify_wide_reg problem when compiling the kernel (2.4.20-benh) 
ppc platform: 
 
gcc -D__KERNEL__ -I/usr/src/benh_kernel/include -Wall -Wstrict-prototypes 
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer 
-I/usr/src/benh_kernel/arch/ppc -fsigned-char -msoft-float -pipe -ffixed-r2 
-Wno-uninitialized -mmultiple -mstring   -nostdinc -iwithprefix include 
-DKBUILD_BASENAME=fib_semantics  -c -o fib_semantics.o fib_semantics.c 
fib_semantics.c: In function `fib_create_info': 
fib_semantics.c:578: Internal compiler error in verify_wide_reg, at flow.c:560 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
make[5]: *** [fib_semantics.o] Error 1 
make[5]: Leaving directory `/usr/src/benh_kernel/net/ipv4' 
make[4]: *** [first_rule] Error 2 
make[4]: Leaving directory `/usr/src/benh_kernel/net/ipv4' 
make[3]: *** [_subdir_ipv4] Error 2 
make[3]: Leaving directory `/usr/src/benh_kernel/net' 
make[2]: *** [_dir_net] Error 2 
make[2]: Leaving directory `/usr/src/benh_kernel' 
make[1]: *** [stamp-build] Error 2 
make[1]: Leaving directory `/usr/src/benh_kernel' 
make: *** [stamp-buildpackage] Error 2 
tomcat:/usr/src/benh_kernel# ls -la /usr/src/benh_kernel/net/ipv4 
 
the gcc is current Debian unstable: 
m@tomcat:~$ gcc -v 
Reading specs from /usr/lib/gcc-lib/powerpc-linux/3.2.3/specs 
Configured with: ../src/configure -v --enable-languages=c,c++,f77,objc,ada --prefix=/usr 
--mandir=/usr/share/man --infodir=/usr/share/info 
--with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib 
--enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu 
--enable-objc-gc powerpc-linux 
Thread model: posix 
gcc version 3.2.3 (Debian) 
 
the kernel compiled with the same settings before the upgrade and setting of a debug 
#define. 
 
Sorry for not being more specific, this is my first gcc bug report. 
 
Mark 
Comment 9 Eric Botcazou 2003-06-13 09:10:56 UTC
Subject: Re:  [3.4 regression] [SPARC64] ICE in verify_wide_reg, at flow.c:551, while compiling libjava

> I seem to have this verify_wide_reg problem when compiling the
> kernel (2.4.20-benh) ppc platform:
>
> gcc -D__KERNEL__ -I/usr/src/benh_kernel/include -Wall -Wstrict-prototypes
> -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer
> -I/usr/src/benh_kernel/arch/ppc -fsigned-char -msoft-float -pipe
> -ffixed-r2 -Wno-uninitialized -mmultiple -mstring   -nostdinc -iwithprefix
> include -DKBUILD_BASENAME=fib_semantics  -c -o fib_semantics.o
> fib_semantics.c fib_semantics.c: In function `fib_create_info':
> fib_semantics.c:578: Internal compiler error in verify_wide_reg, at
> flow.c:560 Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> make[5]: *** [fib_semantics.o] Error 1
> make[5]: Leaving directory `/usr/src/benh_kernel/net/ipv4'
> make[4]: *** [first_rule] Error 2
> make[4]: Leaving directory `/usr/src/benh_kernel/net/ipv4'
> make[3]: *** [_subdir_ipv4] Error 2
> make[3]: Leaving directory `/usr/src/benh_kernel/net'
> make[2]: *** [_dir_net] Error 2
> make[2]: Leaving directory `/usr/src/benh_kernel'
> make[1]: *** [stamp-build] Error 2
> make[1]: Leaving directory `/usr/src/benh_kernel'
> make: *** [stamp-buildpackage] Error 2
> tomcat:/usr/src/benh_kernel# ls -la /usr/src/benh_kernel/net/ipv4
>
> the gcc is current Debian unstable:
> m@tomcat:~$ gcc -v
> Reading specs from /usr/lib/gcc-lib/powerpc-linux/3.2.3/specs
> Configured with: ../src/configure -v --enable-languages=c,c++,f77,objc,ada
> --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
> --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared
> --with-system-zlib --enable-nls --without-included-gettext
> --enable-__cxa_atexit --enable-clocale=gnu --enable-objc-gc powerpc-linux
> Thread model: posix
> gcc version 3.2.3 (Debian)

This is not the same GCC version and the same platform so, while the symptoms 
are identical, I doubt they have the same cause.

Please file a separate bug report for this ICE on PowerPC.

Thanks.

Comment 10 GCC Commits 2003-06-13 22:13:13 UTC
Subject: Bug 10983

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	ebotcazou@gcc.gnu.org	2003-06-13 22:13:09

Modified files:
	gcc            : ChangeLog combine.c 

Log message:
	PR bootstrap/10983
	* combine.c (make_extraction): Use gen_lowpart_for_combine
	when extracting from a REG and not in the destination of a SET.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.18200&r2=1.18201
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/combine.c.diff?cvsroot=gcc&r1=1.362&r2=1.363

Comment 11 Eric Botcazou 2003-06-13 22:16:25 UTC
See http://gcc.gnu.org/ml/gcc/2003-06/msg00909.html
Comment 12 Dara Hazeghi 2003-07-11 23:03:47 UTC
*** Bug 11140 has been marked as a duplicate of this bug. ***