[RFC] PR middle-end/179 gcc -O2 -Wuninitialized missing warning with &var

Manuel López-Ibáñez lopezibanez@gmail.com
Mon Aug 11 15:50:00 GMT 2008


2008/8/11 Richard Guenther <richard.guenther@gmail.com>:
>>
>> GCC does not bootstrap without that. It gives false positives for
>> really weird cases that are obviously correctly initialized before
>> used. That whole function was designed by trial and error until GCC
>> bootstrapped.
>
> Huh.  Ok.  I think the patch should add testcases for (each) of them ;)

I wish I could have testcases but every one I built did not show the
original problem. I think they are caused (at least partially) by
inlining.

> Still it doesn't make much sense to me to exclude aggregates
> or call clobbered variables.

I am excluding everything that is not completely relevant to the
testcase I posted above. If I could exclude further, I will. The goal
is to increment the scope of the warning iteratively in further
patches.

>> I cannot use that because I only warn if there is 1 VUSE, otherwise I
>> get false positives in bootstrap. I mentioned that I am trying to warn
>> for a very specific case. Further patches should enhance this
>> iteratively.
>
> I see.  In this case just use SINGLE_SSA_USE_OPERAND (use_stmt,
> SSA_OP_VIRTUAL_USES).
>

Thanks, I will check that if the LOADED_SYM approach do not work.

> Virtual SSA operators are exactly the same as LOADED_SYMS
> (in fact, SSA VOPs are built walking over LOADED_SYMS).

?? Are they chained as well? And how you distinguish between VUSE and VDEF?

Cheers,

Manuel.



More information about the Gcc-patches mailing list