This is the mail archive of the
mailing list for the GCC project.
Re: PR 15454: wrong code due to tree constant propagation
- From: Steven Bosscher <stevenb at suse dot de>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Steven Bosscher <stevenb at suse dot de>, gcc-patches at gcc dot gnu dot org,rth at redhat dot com
- Date: Mon, 17 May 2004 16:37:25 +0200 (CEST)
- Subject: Re: PR 15454: wrong code due to tree constant propagation
- Organization: SuSE Linux AG
- References: <firstname.lastname@example.org><email@example.com>
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.