Hi

I built a native power gcc, and used it to build 403.gcc in SPEC2006,
I got the following error when I specify -m32

In file included from rtl.c:188:0:
machmode.def:79:1: warning: left shift count >= width of type [enabled
by default]
 DEF_MACHMODE (SImode, "SI", MODE_INT, BITS_PER_UNIT*4, 4, 4, DImode, VOIDmode)
 ^
machmode.def:79:1: error: initializer element is not constant
machmode.def:79:1: error: (near initialization for 'mode_mask_array[4]')
machmode.def:89:1: warning: left shift count >= width of type [enabled
by default]
 DEF_MACHMODE (PSImode, "PSI", MODE_PARTIAL_INT, BITS_PER_UNIT*4, 4,
4, PDImode, VOIDmode)
 ^
machmode.def:89:1: error: initializer element is not constant
machmode.def:89:1: error: (near initialization for 'mode_mask_array[10]')
machmode.def:95:1: warning: left shift count >= width of type [enabled
by default]
 DEF_MACHMODE (SFmode, "SF", MODE_FLOAT, BITS_PER_UNIT*4, 4, 4,
DFmode, VOIDmode)
 ^
machmode.def:95:1: error: initializer element is not constant
machmode.def:95:1: error: (near initialization for 'mode_mask_array[15]')
machmode.def:102:1: warning: left shift count >= width of type
[enabled by default]
 DEF_MACHMODE (HCmode, "HC", MODE_COMPLEX_FLOAT, BITS_PER_UNIT*4, 4,
2, SCmode, HFmode)
 ^
machmode.def:102:1: error: initializer element is not constant
machmode.def:102:1: error: (near initialization for 'mode_mask_array[20]')
machmode.def:109:1: warning: left shift count >= width of type
[enabled by default]
 DEF_MACHMODE (CHImode, "CHI", MODE_COMPLEX_INT, BITS_PER_UNIT*4, 4,
2, CSImode, HImode)
 ^
machmode.def:109:1: error: initializer element is not constant
machmode.def:109:1: error: (near initialization for 'mode_mask_array[26]')
machmode.def:122:1: warning: left shift count >= width of type
[enabled by default]
 DEF_MACHMODE (V2HImode, "V2HI", MODE_VECTOR_INT, BITS_PER_UNIT*4, 4,
2, V8QImode, HImode)
 ^
machmode.def:122:1: error: initializer element is not constant
machmode.def:122:1: error: (near initialization for 'mode_mask_array[32]')
machmode.def:126:1: warning: left shift count >= width of type
[enabled by default]
 DEF_MACHMODE (V4QImode, "V4QI", MODE_VECTOR_INT, BITS_PER_UNIT*4, 4,
1, V2HImode, QImode)
 ^
machmode.def:126:1: error: initializer element is not constant
machmode.def:126:1: error: (near initialization for 'mode_mask_array[35]')
machmode.def:159:1: warning: left shift count >= width of type
[enabled by default]
 CC (CCmode, "CC")
 ^
machmode.def:159:1: error: initializer element is not constant
machmode.def:159:1: error: (near initialization for 'mode_mask_array[52]')
machmode.def:162:1: warning: left shift count >= width of type
[enabled by default]
 EXTRA_CC_MODES
 ^
machmode.def:162:1: error: initializer element is not constant
machmode.def:162:1: error: (near initialization for 'mode_mask_array[53]')
machmode.def:162:1: warning: left shift count >= width of type
[enabled by default]
machmode.def:162:1: error: initializer element is not constant
machmode.def:162:1: error: (near initialization for 'mode_mask_array[54]')
machmode.def:162:1: warning: left shift count >= width of type
[enabled by default]
machmode.def:162:1: error: initializer element is not constant
machmode.def:162:1: error: (near initialization for 'mode_mask_array[55]')
machmode.def:162:1: warning: left shift count >= width of type
[enabled by default]
machmode.def:162:1: error: initializer element is not constant
machmode.def:162:1: error: (near initialization for 'mode_mask_array[56]')
machmode.def:162:1: warning: left shift count >= width of type
[enabled by default]
machmode.def:162:1: error: initializer element is not constant
machmode.def:162:1: error: (near initialization for 'mode_mask_array[57]')
machmode.def:162:1: warning: left shift count >= width of type
[enabled by default]
machmode.def:162:1: error: initializer element is not constant
machmode.def:162:1: error: (near initialization for 'mode_mask_array[58]')


The command line that caused the error is:

/trunkbin/bin/gcc -c -o rtl.o -DSPEC_CPU -DNDEBUG -I.  -O2
-DSPEC_CPU_LP64 -m32        rtl.c


The preprocessed source code that caused the error is:

((8*4) >= (8 * 8)) ? ~(unsigned long) 0 : ((unsigned long) 1 << (8*4)) - 1,

The left shift count is 32, it is actually less than the width of
unsigned long 64. Is this a gcc bug?

My gcc is configured as:

../trunk/configure --enable-threads=posix --enable-c99
--enable-long-long --build=powerpc-linux-gnu --with-gnu-as
--with-gnu-ld --enable-languages=c,c++,fortran
--enable-targets=powerpc-linux,powerpc64-linux --disable-bootstrap

thanks
Carrot

Reply via email to