This is the mail archive of the gcc@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: Where does tree-ssa.c read the variable names for -Wuninitialized messages?


François-Xavier Coudert wrote on 09/25/06 08:35:
> Hi,
> 
> I'm trying to understand PR 13615, where a used-uninitialized Fortran
> character string induces the following diagnostic:
> 
> 'c[1]{lb: 1 sz: 1}t.f: In function 'warn_character':
> t.f:33: warning: ' is used uninitialized in this function
> 
> I see that this error message is emitted from tree-ssa.c, but I'm not
> skilled enough in middle-end magic to understand whether the fault is
> on the front-end not setting something correctly, or the middle-end
> not understanding what this variable is. I hope someone here could,
> without too much trouble, help me.
> 
The analysis is done over SSA names.  The variable name is taken from
SSA_NAME_VAR, which is a _DECL that had been gathered during the initial
into SSA phase (find_referenced_vars and rewrite_into_ssa).

I'd say the FE is not setting the name properly into whatever _DECL we
found.

Set a breakpoint at the end of tree-ssa.c:warn_uninit to examine the
_DECL node.


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