This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR 15454: wrong code due to tree constant propagation


On May 17, 2004 04:23 PM, Jason Merrill <jason@redhat.com> wrote:

> On Mon, 17 May 2004 09:13:40 +0200, Steven Bosscher <stevenb@suse.de> 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.

Gr.
Steven





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]