PATCH: silence warning in tree-ssa-pre.c
Ben Elliston
bje@au1.ibm.com
Wed Dec 3 11:54:00 GMT 2008
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
More information about the Gcc-patches
mailing list