This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: AIX regressions
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Geoff Keating <geoffk at redhat dot com>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 01 Dec 2001 23:35:07 -0500
- Subject: Re: AIX regressions
Compiling emit-rtl.c generates the following warnings:
/gcc/dje/src/gcc/emit-rtl.c: In function `gen_lowpart_common':
/gcc/dje/src/gcc/emit-rtl.c:1064: warning: left shift count >= width of type
/gcc/dje/src/gcc/emit-rtl.c:1065: warning: left shift count >= width of type
The problematic section is:
/* Now, pack the 32-bit elements of the array into a CONST_DOUBLE
and return it. */
#if HOST_BITS_PER_WIDE_INT == 32
return immed_double_const (i[3 * endian], i[1 + endian], mode);
#else
if (HOST_BITS_PER_WIDE_INT != 64)
abort ();
return immed_double_const (i[3 * endian] | (i[1 + endian] << 32),
i[2 - endian] | (i[3 - 3 * endian] << 32),
mode);
#endif
The array "i" is defined as type "long" not "HOST_WIDE_INT":
long i[4]; /* Only the low 32 bits of each 'long' are used. */
but the test is HOST_BITS_PER_WIDE_INT.
This patch must have been written when HOST_WIDE_INT always was
"long" because now it can be "long long". The test does not guarantee
that a long is 64 bits. I am bootstrapping with "i" defined as
HOST_WIDE_INT.
David