Fix bootstrap failure due to uninitialized variable in optabs.c

Manuel López-Ibáñez lopezibanez@gmail.com
Tue Sep 4 18:34:00 GMT 2007


On 04/09/07, Zack Weinberg <zack@codesourcery.com> wrote:
> Manuel López-Ibáñez wrote:
> > On 03/09/07, Zack Weinberg <zack@codesourcery.com> wrote:
> >> The warning is, for the record, one of the classic
> >> used-and-set-only-under-the-same-conditional false positives.
> >
> > Was it a "is used" or "may be used" ?
>
> "is used".
>

I am not able to reproduce the warning. Nonetheless, it seems to me that for

optab_handler (ctz_optab, mode)->insn_code == CODE_FOR_nothing
&& optab_handler (clz_optab, mode)->insn_code != CODE_FOR_nothing
&& CLZ_DEFINED_VALUE_AT_ZERO (mode, val) != 2

then defined_at_zero was not initialized.

Taking into account that this may be known at compile time (am I wrong
here?), then the warning seems correct. I would need to check a
preprocessed file that triggers the warning to be sure what is going
on. My guess: the uninitialized value is assigned to a temp variable
created by us and we give "is used" warnings for default definition
uses in non-PHI nodes even in conditional blocks. Probably similar to
PR20644.

Cheers,

Manu.



More information about the Gcc-patches mailing list