gcc version 3.5.0 20040901 (experimental) Libgfortran aborts with the following error message: /opt/build/eric/gcc/gcc/gfortran -B/opt/build/eric/gcc/gcc/ -B/opt/build/eric/local/gcc-3.5.0/sparc64-sun-solaris2.9/bin/ -B/opt/build/eric/local/gcc-3.5.0/sparc64-sun-solaris2.9/lib/ -isystem /opt/build/eric/local/gcc-3.5.0/sparc64-sun-solaris2.9/include -isystem /opt/build/eric/local/gcc-3.5.0/sparc64-sun-solaris2.9/sys-include -g -O2 -Wall -fno-repack-arrays -fno-underscoring -c /home/eric/cvs/gcc/libgfortran/intrinsics/selected_real_kind.f90 -fPIC -DPIC -o .libs/selected_real_kind.o In file /home/eric/cvs/gcc/libgfortran/intrinsics/selected_real_kind.f90:61 end function 1 Internal Error at (1): gfc_validate_kind(): Got bad kind gmake[2]: *** [selected_real_kind.lo] Error 1 gmake[2]: Leaving directory `/opt/build/eric/gcc/sparc64-sun-solaris2.9/libgfortran' gmake[1]: *** [all] Error 2 gmake[1]: Leaving directory `/opt/build/eric/gcc/sparc64-sun-solaris2.9/libgfortran' gmake: *** [all-target-libgfortran] Error 2 The selected_real_kind.inc file reads: integer, parameter :: c = 3 type (real_info), parameter :: real_infos(c) = (/ & real_info (4, precision(0.0_4), range(0.0_4)), & real_info (8, precision(0.0_8), range(0.0_8)), & real_info (16, precision(0.0_16), range(0.0_16)) /) and is the same as for SPARC 32-bit, which doesn't ICE on it.
I can't reproduce this with a cross-compiler.
> I can't reproduce this with a cross-compiler. Ok, that's what I feared, thanks for trying. I'll wait a couple of days for a miracle :-) and then start digging.
Confirmed on Linux by C.Joensson.
AuroraFedora Core release 1.91 (Wombat FC2) UP UltraSparc IIi (Sabre) sun4u: binutils-2.15.90.0.3-6 bison-1.875-7.1 dejagnu-1.4.2-11 expect-5.39.0-96.1 gcc-3.3.3-3 glibc-2.3.3-26sparc3.sparc glibc-2.3.3-26sparc3.sparc64 glibc-kernheaders-2.6-14sparc kernel-2.6.8-1.571sp1 tcl-8.4.5-6 zlib-1.2.1.1-2.1.sparc zlib-1.2.1.1-2.1.sparc64 LAST_UPDATED: Sun Sep 19 21:25:30 UTC 2004 configure: --enable-__cxa_atexit --enable-shared --enable- languages=c,c++,f95,java,objc /bin/sh ./libtool --mode=compile /usr/local/src/trunk/objdir/gcc/gfortran -B/us r/local/src/trunk/objdir/gcc/ -B/usr/local/sparc64-unknown-linux-gnu/bin/ -B/us r/local/sparc64-unknown-linux-gnu/lib/ -isystem /usr/local/sparc64-unknown-linu x-gnu/include -isystem /usr/local/sparc64-unknown-linux-gnu/sys-include -g -O2 -Wall -fno-repack-arrays -fno-underscoring -c -o _exp_r4.lo `test -f 'generate d/_exp_r4.f90' || echo '/usr/local/src/trunk/gcc/libgfortran/'`generated/_exp_r 4.f90 /usr/local/src/trunk/objdir/gcc/gfortran -B/usr/local/src/trunk/objdir/gcc/ -B\ usr/local/sparc64-unknown-linux-gnu/bin/ -B/usr/local/sparc64-unknown-linux-gnu /lib/ -isystem /usr/local/sparc64-unknown-linux-gnu/include -isystem /usr/local /sparc64-unknown-linux-gnu/sys-include -g -O2 -Wall -fno-repack-arrays -fno-und erscoring -c /usr/local/src/trunk/gcc/libgfortran/generated/_exp_r4.f90 -fPIC -DPIC -o .libs/_exp_r4.o In file /usr/local/src/trunk/gcc/libgfortran/generated/_exp_r4.f90:28 specific__exp_r4 = exp (parm) 1 Error: Type of argument 'x' in call to 'exp' at (1) should be REAL(6965448), no t REAL(4) In file /usr/local/src/trunk/gcc/libgfortran/generated/_exp_r4.f90:28 specific__exp_r4 = exp (parm) 1 Error: Function reference to '/usr/local/src/trunk/gcc/libgfortran/generated/_e xp_r4.f90:0: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. make[3]: *** [_exp_r4.lo] Error 1 make[3]: Leaving directory `/usr/local/src/trunk/objdir/sparc64-unknown-linux-g nu/libgfortran'
So this is wrong-code, I think this is a regression too but I almost think this is an RTL-opt problem or a target problem.
I've been on it since yesterday. The miscompiled function on Solaris is intrinsic.c:add_functions, but I suspect it's not the same on Linux because of the different code model (the C compiler can't even be bootstrapped on Solaris as of today).
Subject: Bug 17266 CVSROOT: /cvs/gcc Module name: gcc Changes by: ebotcazou@gcc.gnu.org 2004-09-21 05:57:58 Modified files: gcc : ChangeLog regmove.c Log message: PR rtl-optimization/17266 * regmove.c (optimize_reg_copy_3): Make a new SUBREG for each insn. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5544&r2=2.5545 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/regmove.c.diff?cvsroot=gcc&r1=1.162&r2=1.163
See http://gcc.gnu.org/ml/gcc-patches/2004-09/msg01966.html