new g77 x86 ICE in 19990328
Jeffrey A Law
law@upchuck.cygnus.com
Sun Apr 4 04:29:00 GMT 1999
In message <19990328181544.10702.qmail@deer>you write:
> This is a new ICE -- no ICE in previous snapshots. Could someone
> currently working on the x86 backend look into it, and let me know
> if it turns out to be a g77 front-end bug, e.g. a latent one uncovered
> by recent improvements to the x86?
>
> --------
> [craig@deer play]$ /develop/egcs/19990328/bin/g77 -O2 -v -c ice.f
> g77 version egcs-2.93.14 19990328 (gcc2 ss-980929 experimental) (from FSF-g
> 77 version 0.5.24-19990313)
> Reading specs from /develop/egcs/19990328/lib/gcc-lib/i686-pc-linux-gnu/egc
> s-2.93.14/specs
> gcc version egcs-2.93.14 19990328 (gcc2 ss-980929 experimental)
> /develop/egcs/19990328/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.93.14/f771 ice
> .f -quiet -dumpbase ice.f -O2 -version -fversion -o /tmp/ccsUcaaa.s
> GNU F77 version egcs-2.93.14 19990328 (gcc2 ss-980929 experimental) (i686-p
> c-linux-gnu) compiled by GNU C version egcs-2.93.14 19990328 (gcc2 ss-98092
> 9 experimental).
> GNU Fortran Front End version 0.5.24-19990313
> ../../egcs-19990328/gcc/config/i386/i386.c:3697: Internal compiler error in
> function print_operand
> Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
> See <URL: http://egcs.cygnus.com/faq.html#bugreport > for details.
> [craig@deer play]$
Got it. It's an obscure latent bug.
I'll buy a beer at LinuxExpo for the first person that can spot the problem in
this code from emit-rtl.c::operand_subword. You've got until I get back from
skiing tomorrow afternoon :-)
/* If OP is a REG or SUBREG, we can handle it very simply. */
if (GET_CODE (op) == REG)
{
/* If the register is not valid for MODE, return 0. If we don't
do this, there is no way to fix up the resulting REG later. */
if (REGNO (op) < FIRST_PSEUDO_REGISTER
&& ! HARD_REGNO_MODE_OK (REGNO (op) + i, word_mode))
return 0;
else if (REGNO (op) >= FIRST_PSEUDO_REGISTER
|| (REG_FUNCTION_VALUE_P (op)
&& rtx_equal_function_value_matters)
/* We want to keep the stack, frame, and arg pointers
special. */
|| op == frame_pointer_rtx
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
|| op == arg_pointer_rtx
#endif
|| op == stack_pointer_rtx)
return gen_rtx_SUBREG (word_mode, op, i);
else
return gen_rtx_REG (word_mode, REGNO (op) + i);
}
A hint, OP is the last register in the FP stack register class on the x86.
jeff
More information about the Gcc-bugs
mailing list