http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13615

--- Comment #12 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #11)
> At revision 200321, I still get no warning for tests as in comment #7 and
> 
> pr13615_1.f90:3:0: warning: 'c[1]{lb: 1 sz: 1}' is used uninitialized in
> this function [-Wuninitialized]
> 
> as in comment #8. What dump(s) would be necessary for any progress for this
> PR?

The SSA built is:

warn_character (character(kind=1)D.24[1:1] & restrict dD.1877,
integer(kind=4)D.8 _dD.1876)
{
  character(kind=1)D.24 cD.1878[1:1];
  character(kind=1)D.24 _2;

;;   basic block 2, loop depth 0, count 0, freq 0, maybe hot
;;    prev block 0, next block 1, flags: (NEW, REACHABLE)
;;    pred:       ENTRY (FALLTHRU)
;;   starting at line 3
  [z.f : 3:0] # VUSE <.MEM_1(D)>
  _2 = [z.f : 3] cD.1878[1]{lb: 1 sz: 1};
  [z.f : 3:0] # .MEM_4 = VDEF <.MEM_1(D)>
  [z.f : 3] [z.f : 3] *d_3(D)[1]{lb: 1 sz: 1} = _2;
  # .MEM_5 = VDEF <.MEM_4>
  cD.1878 ={v} {CLOBBER};
  [z.f : 4:0] # VUSE <.MEM_5>
  return;
;;    succ:       EXIT

}

as you can see, the middle-end somehow thinks that the function reads from
uninitialized memory. If this is the fault of gfortran or the middle-end, I
really don't know. Perhaps Richard or Jakub have better idea of what is going
on.

Reply via email to