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: PATCH: silence warning in tree-ssa-pre.c


Hi Richard

> > My system compiler warns about an uninitialised variable used in
> > tree-ssa-pre.c.  This patch initialises that variable and, for good
> > measure, asserts that it will have a non-null value before being
> > dereferenced.  Okay for mainline, pending a successful bootstrap?
> 
> > +         gcc_assert (edoubleprime != NULL);

> Ok.

The bootstrap turned up the fact that this assertion is wrong. ;-)
There are cases when edoubleprime can be null at the assertion point,
but the dereference is guarded by `all_same', which is always false when
edoubleprime is null.

  3300            else if (!cant_insert && all_same && eprime
  3301                     && (edoubleprime->kind == CONSTANT
  3302                         || edoubleprime->kind == NAME)
  3303                     && !value_id_constant_p (val))
  3304              {

Therefore, I will commit a patch to just initialise edoubleprime.

Cheers, Ben


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