title: Valgrind shows uninitialized variable in Fortran code
body: <p>I'm executing a valgrind (with memcheck tool) on the Fortran application.
  Following error is shown by valgrind:</p>
  
  <pre><code>==17072==    at 0x806C4A2: prove_ (t10_isb.f90:1948)
  ==17072==    by 0x804E9F3: anal1_ (t10_isb.f90:2721)
  ==17072==    by 0x808EECC: MAIN__ (t10_isb.f90:6)
  ==17072==    by 0x808EF14: main (t10_isb.f90:8)
  ==17072==  Uninitialised value was created by a stack allocation
  ==17072==    at 0x805ECDC: relplm_ (t10_isb.f90:3402)
  ==17072== 
  ==17072== 
  ==17072== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- y
  </code></pre>
  
  <p>Looking at the source code, I can't find anything suspicious:</p>
  
  <p>Here, on the line 1948, uninitialized variable is used, so I guess it's either ER or EZ:</p>
  
  <pre><code>1943             if(NIT.eq.0) then
  1944                  ER=ER/ekran
  1945                  EZ=EZ/ekran
  1946             end if
  1947
  1948                EM=DSQRT(ER*ER+EZ*EZ)
  1949                ENO=-ER*PK(IEM*9-7)+EZ*PK(IEM*9-5)
  1950
  1951                IF(PK(IEM*9-8).GE.0.5D0) THEN
  1952                   ESS=(ER*(PK(IEM*9-4)-F1)+EZ*(PK(IEM*9-6)-F2))
  </code></pre>
  
  <p>However, going up the call stack, we can see that these variables are initialized straight to calling the PROVE subroutine.</p>
  
  <pre><code>2716
  2717          CALL VECMUL(SQ,JJK,CUR,NTP)
  2718
  2719          ER=0.D0
  2720          EZ=0.D0
  2721          CALL PROVE(E0,ES1,EN2,TE,TEPR,TEMI,TEMA,RB,ZB,QS,QP,R1P,Z1P,RONAT,ROHQ,RNQ,ZNQ,QNQ,NQ,IM1,IM2,IM3,IM4,IM5,IQQ,NTP,NIT,US,NFR,NTPE,NEM,NR,KEYP,MSYS,ekran,UK,RK,ZK,ER,EZ,F1,F2)
  2722
  2723          NPPP=NPAOLD+1
  2724          DO I=NPPP,NPA
  2725            N=I-NPAOLD
  </code></pre>
  
  <p>What am I missing here?</p>