seen with trunk 20080202, works with g77. Compiling without -mlongcall succeeds. Matthias $ /usr/bin/gcc-4.3 -save-temps -DL2SIZE=2097152 -I/home/doko/tmp/atlas-3.6.0/include -I/home/doko/tmp/atlas-3.6.0/include/Linux_altivec_shared -I/home/doko/tmp/atlas-3.6.0/include/contrib -DAdd_ -DStringSunStyle -DATL_OS_Linux -DATL_ARCH_PPCG4 -DATL_AltiVec -DATL_AVgcc -DATL_GAS_LINUX_PPC -fomit-frame-pointer -O3 -maltivec -mabi=altivec -c -o ATL_dgetrf.o -DDREAL ../ATL_getrf.c -fPIC -mlongcall ../ATL_getrf.c: In function 'ATL_dgetrf': ../ATL_getrf.c:38: error: unrecognizable insn: (call_insn 19 18 20 4 ../ATL_getrf.c:36 (parallel [ (set (reg:SI 3 3) (call (mem:SI (symbol_ref:SI ("ATL_dgetrfC") [flags 0x41] <function_decl 0xf7e6c180 ATL_dgetrfC>) [0 S4 A8]) (const_int 0 [0x0]))) (use (const_int 8 [0x8])) (clobber (reg:SI 65 lr)) ]) -1 (nil) (expr_list:REG_DEP_TRUE (use (reg:SI 30 30)) (expr_list:REG_DEP_TRUE (use (reg:SI 7 7)) (expr_list:REG_DEP_TRUE (use (reg:SI 6 6)) (expr_list:REG_DEP_TRUE (use (reg:SI 5 5)) (expr_list:REG_DEP_TRUE (use (reg:SI 4 4)) (expr_list:REG_DEP_TRUE (use (reg:SI 3 3)) (nil)))))))) ../ATL_getrf.c:38: internal compiler error: in extract_insn, at recog.c:1990 Please submit a full bug report, with preprocessed source if appropriate.
Created attachment 15104 [details] preprocessed source
The testcase works for me with a cross from x86_64, but - you mention g77 but this is C preprocessed source. Is it the correct testcase?
This works for me on the trunk, I don't get an ICE.
reproducible with 20080206, gcc is configured with Configured with: ../src/configure -v --with-pkgversion='Debian 4.3-20080206-1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-libffi --enable-objc-gc --enable-mpfr --disable-softfloat --enable-secureplt --enable-targets=powerpc-linux,powerpc64-linux --with-cpu=default32 --disable-werror --with-long-double-128 --enable-checking=release --build=powerpc-linux-gnu --host=powerpc-linux-gnu --target=powerpc-linux-gnu Thread model: posix gcc version 4.3.0 20080206 (experimental) [trunk revision 132160] (Debian 4.3-20080206-1) Matthias
I also can't reproduce it (neither on native nor with a cross). Any local patches? Maybe you can reduce it to a set of simpler configuration options?
I can reproduce this problem with gcc 4.2.3 that comes with Ubuntu 8.04 on PowerPC with the following command line: gcc -Wall -mlongcall -fPIC -c foo.c Removing either `-fPIC' or `-mlongcall' succeeds, it is when used together that it fails with: lisbon [Manu] : gcc -Wall -mlongcall -fPIC -c foo.c foo.c: In function 'idrf_reset_pos': foo.c:23: error: unrecognizable insn: (call_insn 10 9 12 3 (parallel [ (call (mem:SI (symbol_ref:SI ("idr_setpos") [flags 0x1] <function_decl 0x48169700 idr_setpos>) [0 S4 A8]) (const_int 0 [0x0])) (use (const_int 8 [0x8])) (clobber (scratch:SI)) ]) -1 (nil) (nil) (expr_list:REG_DEP_TRUE (use (reg:SI 30 30)) (expr_list:REG_DEP_TRUE (use (reg:SI 4 4)) (expr_list:REG_DEP_TRUE (use (reg:SI 3 3)) (nil))))) foo.c:23: internal compiler error: in extract_insn, at recog.c:2077 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. For Debian GNU/Linux specific bug reporting instructions, see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>. where foo.c is simply: #include <stdlib.h> typedef struct idr { int i_op; size_t i_size; char *i_buf; char *i_ptr; } IDR; typedef struct idrs { IDR i_encode; IDR i_decode; } IDRF; void idr_setpos(IDR *idrs, size_t pos) { } void idrf_reset_pos(IDRF *idrf) { idr_setpos(&idrf->i_encode, 0); idr_setpos(&idrf->i_decode, 0); }
Just adding the version information of gcc: lisbon [Manu] : gcc -v Using built-in specs. Target: powerpc-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --disable-softfloat --enable-secureplt --enable-targets=powerpc-linux,powerpc64-linux --with-cpu=default32 --with-long-double-128 --enable-checking=release --build=powerpc-linux-gnu --host=powerpc-linux-gnu --target=powerpc-linux-gnu Thread model: posix gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7) It would be nice to reopen the case since it is definitely reproducible.
Reopening as this looks related to secureplt.
Closing 4.1 branch.
This got actually fixed by Alan's PR target/36634 fix.
Subject: Bug 35100 Author: jakub Date: Thu Jul 31 20:37:21 2008 New Revision: 138435 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138435 Log: PR target/35100 * gcc.target/powerpc/longcall-1.c: New test. Added: trunk/gcc/testsuite/gcc.target/powerpc/longcall-1.c Modified: trunk/gcc/testsuite/ChangeLog