This is the mail archive of the
mailing list for the GCC project.
Re: PR 15454: wrong code due to tree constant propagation
- From: law at redhat dot com
- To: Steven Bosscher <stevenb at suse dot de>
- Cc: Jason Merrill <jason at redhat dot com>, gcc-patches at gcc dot gnu dot org, rth at redhat dot com
- Date: Mon, 17 May 2004 09:27:17 -0600
- Subject: Re: PR 15454: wrong code due to tree constant propagation
- Reply-to: law at redhat dot com
In message <6789177.1084804645794.SLOX.WebMail.email@example.com>, Steven
>On May 17, 2004 04:23 PM, Jason Merrill <firstname.lastname@example.org> wrote:
>> On Mon, 17 May 2004 09:13:40 +0200, Steven Bosscher <email@example.com> wrote
>> > I believe we should assume that variables without an initializing
>> > statement are VARYING.
>> No, uninitialized variables are undefined. The bug here is that we are
>> pretending that CHAIN is uninitialized, when in fact it is passed as an
>> argument. It should be handled just like any other parm.
>... and we treat other params as VARYING (see how we deal with a
>PARM_DECL in get_default_value).
>The trouble is that I couldn't think of an elegant way to figure out if the
>variable at hand is CHAIN. But I figured it wouldn't matter much anyway
>since the only thing this patch changes is how we handle uses of
>uninitialized variables, which is undefined behavior anyway.
Maybe instead of creating a VAR_DECL for the chain we should instead create
a PARM_DECL. The chain in many ways is just a hidden parameter.