This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: 3.1 bootstrap failure on alpha remains
- To: Brad Lucier <lucier at math dot purdue dot edu>
- Subject: Re: 3.1 bootstrap failure on alpha remains
- From: Richard Henderson <rth at redhat dot com>
- Date: Tue, 22 May 2001 00:35:29 -0700
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- References: <200105211621.LAA09855@zakon.math.purdue.edu>
On Mon, May 21, 2001 at 11:21:39AM -0500, Brad Lucier wrote:
> ../../../libjava/java/lang/strtod.c:719: Internal compiler error in
> reg_overlap_mentioned_p, at rtlanal.c:1255
Combine managed to create
(parallel[
(set (reg:DF 456)
(eq:DF (plus:DF (mult:DF (reg:DF 445)
(subreg:DF (reg/v:DI 104) 0))
(mult:DF (reg:DF 445)
(subreg:DF (reg/v:DI 104) 0)))
(const_double:DF (cc0) 0 [0x0] 0 [0x0] [0])))
(set (plus:DF (subreg:DF (reg/v:DI 104) 0)
(subreg:DF (reg/v:DI 104) 0))
(plus:DF (mult:DF (reg:DF 445)
(subreg:DF (reg/v:DI 104) 0))
(mult:DF (reg:DF 445)
(subreg:DF (reg/v:DI 104) 0))))
] )
from
(insn 1268 1266 1278 (set (subreg:DF (reg/v:DI 103) 0)
(plus:DF (subreg:DF (reg/v:DI 104) 0)
(subreg:DF (reg/v:DI 104) 0))) 90
{adddf3} (nil)
(expr_list:REG_DEAD (reg/v:DI 104) (nil)))
(insn 1280 1278 1283 (set (subreg:DF (reg/v:DI 103) 0)
(mult:DF (reg:DF 445)
(subreg:DF (reg/v:DI 103) 0))) 120
{muldf3} (insn_list 1268 (nil))
(expr_list:REG_DEAD (reg:DF 445) (nil)))
(insn 1283 1280 1284 (set (reg:DF 456)
(eq:DF (subreg:DF (reg/v:DI 103) 0)
(const_double:DF (cc0) 0 [0x0] 0 [0x0] [0]))) 164
{*cmpdf_internal} (insn_list 1280 (nil)) (nil))
Note the very illegal SET_DEST on the second set. It should have been
(set (subreg:DF (reg/v:DI 103) 0)
(plus:DF (mult:DF (reg:DF 445)
(subreg:DF (reg/v:DI 104) 0))
(mult:DF (reg:DF 445)
(subreg:DF (reg/v:DI 104) 0))))
Now, of course this isn't going to be recognized, but before we
finally give up we send that SET_DEST through reg_referenced_p,
which is unhappy about being presented with an expression rtx
instead of an object rtx. Thus the abort.
I have no idea how we didn't run across this before, as the code
that is supposed to prevent it is distinctly inadequate.
Bootstrapped on i686 and alphaev6 linux.
r~
* combine.c (subst): Do not substitute for a register as
a destination subreg/strict_low_part/zero_extract.
Index: combine.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/combine.c,v
retrieving revision 1.203
diff -c -p -d -r1.203 combine.c
*** combine.c 2001/05/22 06:46:19 1.203
--- combine.c 2001/05/22 06:56:23
*************** subst (x, from, to, in_dest, unique_copy
*** 3394,3400 ****
}
else if (fmt[i] == 'e')
{
! if (COMBINE_RTX_EQUAL_P (XEXP (x, i), from))
{
/* In general, don't install a subreg involving two
modes not tieable. It can worsen register
--- 3394,3409 ----
}
else if (fmt[i] == 'e')
{
! /* If this is a register being set, ignore it. */
! new = XEXP (x, i);
! if (in_dest
! && (code == SUBREG || code == STRICT_LOW_PART
! || code == ZERO_EXTRACT)
! && i == 0
! && GET_CODE (new) == REG)
! ;
!
! else if (COMBINE_RTX_EQUAL_P (XEXP (x, i), from))
{
/* In general, don't install a subreg involving two
modes not tieable. It can worsen register