[Bug c/13861] New: cross-compiler ICE (arm-linux target)

yoush at cs dot msu dot su gcc-bugzilla@gcc.gnu.org
Sun Jan 25 18:52:00 GMT 2004


Hello. 
 
I've got an ICE from cross-compiler (arm-linux target) built from Debian 
3.3.3-0pre2 gcc source. 
 
I've cut down the file that triggers the problem and created somewhat minimal 
source (no #include's) that still triggers the bug. Removing more code makes 
the bug to disappear. Removing compiler options also makes the bug to 
disappear. 
 
nikita@bliss:/tmp> arm-linux-gcc -v -c -march=armv4 -mtune=strongarm1100 -O2 
-fPIC -o bug.o bug.c 
Reading specs from /usr/lib/gcc-lib/arm-linux/3.3.3/specs 
Configured with: ../src/configure -v --enable-languages=c,c++ --prefix=/usr 
--mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/
arm-linux/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls 
--without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu 
--enable-debug --includedir=/usr/arm-linux/include --build=i386-linux 
--host=i386-linux --target=arm-linux 
Thread model: posix 
gcc version 3.3.3 20040110 (prerelease) (Debian) 
 /usr/lib/gcc-lib/arm-linux/3.3.3/cc1 -quiet -v -D__GNUC__=3 -D__GNUC_MINOR__=3 
-D__GNUC_PATCHLEVEL__=3 -D__ARM_ARCH_4__ -D__PIC__ -D__pic__ bug.c -quiet 
-dumpbase bug.c -march=armv4 -mtune=strongarm1100 -auxbase-strip bug.o -O2 
-version -fPIC -o /tmp/ccxt2fwg.s 
GNU C version 3.3.3 20040110 (prerelease) (Debian) (arm-linux) 
        compiled by GNU C version 3.3.3 20040110 (prerelease) (Debian). 
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=32048 
ignoring nonexistent directory "/usr/arm-linux/sys-include" 
#include "..." search starts here: 
#include <...> search starts here: 
 /usr/lib/gcc-lib/arm-linux/3.3.3/include 
 /usr/arm-linux/include 
End of search list. 
bug.c: In function `f': 
bug.c:39: error: insn does not satisfy its constraints: 
(insn:HI 210 501 227 0x402e0370 (set (reg:HI 3 r3 [168]) 
        (mem:HI (label_ref 668) [0 S2 A16])) 171 {*movhi_insn_arch4} (nil) 
    (nil)) 
bug.c:39: internal compiler error: in final_scan_insn, at final.c:2722 
Please submit a full bug report 
 
bug.c: 
------------------ 
extern double floor(double x); 
 
#define SPLINE_QUANTBITS	14 
#define SPLINE_QUANTSCALE	(1L<<SPLINE_QUANTBITS) 
#define SPLINE_FRACBITS 	10 
 
static signed short lut[4*(1L<<SPLINE_FRACBITS)]; 
 
void f(void) 
{ 
	int _LIi; 
	int _LLen = (1L<<SPLINE_FRACBITS); 
	float _LFlen = 1.0f / (float)_LLen; 
	float _LScale = (float)SPLINE_QUANTSCALE; 
	for ( _LIi=0; _LIi<_LLen; _LIi++ ) 
	{ 
		float _LCm1, _LC0, _LC1, _LC2; 
		int _LSum; 
		float _LX = ((float)_LIi)*_LFlen; 
		int _LIdx = _LIi<<2; 
		_LCm1 = (float)floor( 0.5 + _LScale * (-0.5*_LX*_LX*_LX + 1.0 * 
_LX*_LX - 0.5 * _LX ) ); 
		_LC0 = (float)floor( 0.5 + _LScale * ( 1.5*_LX*_LX*_LX - 2.5 * 
_LX*_LX + 1.0 ) ); 
		_LC1 = (float)floor( 0.5 + _LScale * (-1.5*_LX*_LX*_LX + 2.0 * 
_LX*_LX + 0.5 * _LX ) ); 
		_LC2 = (float)floor( 0.5 + _LScale * ( 0.5*_LX*_LX*_LX - 0.5 * 
_LX*_LX ) ); 
		lut[_LIdx+0]	= (signed short)( (_LCm1 < -_LScale) ? 
-_LScale : ((_LCm1 > _LScale) ? _LScale : _LCm1) ); 
		lut[_LIdx+1]	= (signed short)( (_LC0  < -_LScale) ? 
-_LScale : ((_LC0  > _LScale) ? _LScale : _LC0 ) ); 
		lut[_LIdx+2]	= (signed short)( (_LC1  < -_LScale) ? 
-_LScale : ((_LC1  > _LScale) ? _LScale : _LC1 ) ); 
		lut[_LIdx+3]	= (signed short)( (_LC2  < -_LScale) ? 
-_LScale : ((_LC2  > _LScale) ? _LScale : _LC2 ) ); 
 
		_LSum = lut[_LIdx+0]+lut[_LIdx+1]+lut[_LIdx+2]+lut[_LIdx+3]; 
		if ( _LSum != SPLINE_QUANTSCALE ) 
		{	int _LMax = _LIdx; 
			if( lut[_LIdx+1]>lut[_LMax] ) _LMax = _LIdx+1; 
			if( lut[_LIdx+2]>lut[_LMax] ) _LMax = _LIdx+2; 
			if( lut[_LIdx+3]>lut[_LMax] ) _LMax = _LIdx+3; 
			lut[_LMax] += (SPLINE_QUANTSCALE-_LSum); 
		} 
	} 
}

-- 
           Summary: cross-compiler ICE (arm-linux target)
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: yoush at cs dot msu dot su
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: x86-linux
  GCC host triplet: x86-linux
GCC target triplet: arm-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13861



More information about the Gcc-bugs mailing list