This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: optimization/3783
- To: nobody at gcc dot gnu dot org
- Subject: Re: optimization/3783
- From: "Jessica Han" <jessica at cup dot hp dot com>
- Date: 4 Sep 2001 20:36:01 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: "Jessica Han" <jessica at cup dot hp dot com>
The following reply was made to PR optimization/3783; it has been noted by GNATS.
From: "Jessica Han" <jessica@cup.hp.com>
To: <wilson@redhat.com>, <gcc-gnats@gcc.gnu.org>,
<gcc-prs@gcc.gnu.org>, <linux-ia64@linuxia64.org>,
<davidm@hpl.hp.com>, <davidm@hpl.hp.com>, <gcc-bugs@gcc.gnu.org>,
<nobody@gcc.gnu.org>
Cc:
Subject: Re: optimization/3783
Date: Tue, 4 Sep 2001 13:33:04 -0700
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%26pr=3783%26database=gcc
It seems this problem occurs only when we have POST_INC addressing mode.
With POST_INC, for rtl "set reg351, reg328 PLUS 1", attempt_auto_inc
(flow.c) will change reg328 into reg351 as an operand of POST_INC, but leave
the "PLUS" as is. Thus the RTL becomes "set reg 351, reg351 PLUS 1" and
causes the infinite recursion in canon_rtx. If I substitute "reg328 PLUS 1"
with POST_INC reg351, the testcase attached in GNAT will pass at compile
time.
The fix I did is in attempt_auto_inc:
< validate_change (incr, &XEXP (y, opnum), q, 1);
---
> validate_change (incr, &y, inc, 1);
Is this the right thing to do? Thanks.