* bug in expr.c?
@ 1998-02-09 21:34 Robert Lipe
1998-02-10 3:34 ` Jeffrey A Law
0 siblings, 1 reply; 5+ messages in thread
From: Robert Lipe @ 1998-02-09 21:34 UTC (permalink / raw)
To: egcs
I was cleaning up warnings expr.c and believe this to be a bug. Can
anyone that actually understands this confirm or deny this?
expand_assignment()
if (TREE_CODE (to) == COMPONENT_REF
&& TREE_READONLY (TREE_OPERAND (to, 1)))
{
if (offset = 0)
to_rtx = copy_rtx (to_rtx);
RTX_UNCHANGING_P (to_rtx) = 1;
}
That copy_rtx will never ever be called, right?
Is the "obvious" fix of "offset == 0" correct?
Thanx,
RJL
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bug in expr.c?
1998-02-09 21:34 bug in expr.c? Robert Lipe
@ 1998-02-10 3:34 ` Jeffrey A Law
0 siblings, 0 replies; 5+ messages in thread
From: Jeffrey A Law @ 1998-02-10 3:34 UTC (permalink / raw)
To: Robert Lipe; +Cc: egcs
In message < 19980209233414.16572@dgii.com >you write:
> I was cleaning up warnings expr.c and believe this to be a bug. Can
> anyone that actually understands this confirm or deny this?
>
> expand_assignment()
>
> if (TREE_CODE (to) == COMPONENT_REF
> && TREE_READONLY (TREE_OPERAND (to, 1)))
> {
> if (offset = 0)
> to_rtx = copy_rtx (to_rtx);
>
> RTX_UNCHANGING_P (to_rtx) = 1;
> }
>
> That copy_rtx will never ever be called, right?
>
> Is the "obvious" fix of "offset == 0" correct?
Correct. If you look a little above that line you'll see something like
this:
/* When the offset is zero, to_rtx is the address of the
structure we are storing into, and hence may be shared.
We must make a new MEM before setting the volatile bit. */
if (offset == 0)
to_rtx = copy_rtx (to_rtx);
MEM_VOLATILE_P (to_rtx) = 1;
It's basically the same issue, except that we're setting the readonly bit.
jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bug in expr.c?
1998-02-12 20:07 Mike Stump
@ 1998-02-13 2:04 ` Robert Lipe
0 siblings, 0 replies; 5+ messages in thread
From: Robert Lipe @ 1998-02-13 2:04 UTC (permalink / raw)
To: Mike Stump, egcs
At Jeff's suggestion I've now committed this fix into EGCS. Only the
development branch is affected. 1.0.2 didn't inherit this typo from
a 2.8.x import.
RJL
Mike Stump wrote:
> Here is what kenner said:
>
> > Date: Thu, 12 Feb 98 10:10:50 EST
> > From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner)
> > Message-Id: <9802121510.AA08266@vlsi1.ultra.nyu.edu>
> > To: mrs@wrs.com
> > Cc: robertl@dgii.com
>
> > Yes, that was a clear typo. Thanks. I fixed it.
>
> Code now reads:
>
> {
> if (offset == 0)
> to_rtx = copy_rtx (to_rtx);
>
> RTX_UNCHANGING_P (to_rtx) = 1;
> }
>
> at the FSF.
>
>
--
Robert Lipe http://www.dgii.com/people/robertl robertl@dgii.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bug in expr.c?
@ 1998-02-12 20:07 Mike Stump
1998-02-13 2:04 ` Robert Lipe
0 siblings, 1 reply; 5+ messages in thread
From: Mike Stump @ 1998-02-12 20:07 UTC (permalink / raw)
To: egcs
Here is what kenner said:
> Date: Thu, 12 Feb 98 10:10:50 EST
> From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner)
> Message-Id: <9802121510.AA08266@vlsi1.ultra.nyu.edu>
> To: mrs@wrs.com
> Cc: robertl@dgii.com
> Yes, that was a clear typo. Thanks. I fixed it.
Code now reads:
{
if (offset == 0)
to_rtx = copy_rtx (to_rtx);
RTX_UNCHANGING_P (to_rtx) = 1;
}
at the FSF.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bug in expr.c?
@ 1998-02-10 14:45 Mike Stump
0 siblings, 0 replies; 5+ messages in thread
From: Mike Stump @ 1998-02-10 14:45 UTC (permalink / raw)
To: egcs, kenner, robertl
This work was put in by kenner at the FSF, he might be able to say for
sure:
Thu Nov 20 16:37:36 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* expr.c (expand_assignment): If assigning to readonly field,
mark rtx as unchanging.
revision 1.463
date: 1997/11/20 23:38:15; author: kenner; state: Exp; lines: +9 -0
(expand_assignment): If assigning to readonly field, mark rtx as unchanging.
> Date: Mon, 9 Feb 1998 23:34:14 -0600
> From: Robert Lipe <robertl@dgii.com>
> To: egcs@cygnus.com
> I was cleaning up warnings expr.c and believe this to be a bug. Can
> anyone that actually understands this confirm or deny this?
> expand_assignment()
> if (TREE_CODE (to) == COMPONENT_REF
> && TREE_READONLY (TREE_OPERAND (to, 1)))
> {
> if (offset = 0)
> to_rtx = copy_rtx (to_rtx);
> RTX_UNCHANGING_P (to_rtx) = 1;
> }
> That copy_rtx will never ever be called, right?
> Is the "obvious" fix of "offset == 0" correct?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1998-02-13 2:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-09 21:34 bug in expr.c? Robert Lipe
1998-02-10 3:34 ` Jeffrey A Law
1998-02-10 14:45 Mike Stump
1998-02-12 20:07 Mike Stump
1998-02-13 2:04 ` Robert Lipe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).