title: Warning on an optional arg disapears if it is the only arg of the subroutine
body: <p>I have a strange problem: a warning on an optional parameter of a subroutine when compiling with optimization on. However, if that optional parameter is the only parameter of the subroutine, there is no warning. To illustrate, I have the sample code bellow, two small modules <code>test1</code> and <code>test2</code> in the same file t3.f90. <code>test1</code> define the subroutine <code>foo1</code> and <code>test2</code> define the subroutine <code>foo2</code>.  <code>foo1</code> has 2 parameters, one mandatory and one optional. <code>foo2</code> has only the optional parameter. The difference between <code>foo1</code> and <code>foo2</code> is the mandatory <code>arg</code> and the printing of that mandatory arg.</p>
  
  <pre><code>module test1
  
  contains
      !
      subroutine foo1(a, t)
          integer, intent(in) :: a
          integer , dimension(:), intent(in out), optional :: t
          !
          print*, a! actually, do something with a
          if(present(t))then
              t = 1!.true.
          end if
      end subroutine foo1
      !
  end module test1
  
  
  module test2
  
  contains
      !
      subroutine foo2(t)
          integer , dimension(:), intent(in out), optional :: t
          !
          if(present(t))then
              t = 1 !actually, 1 is replace by a function call
          end if
      end subroutine foo2
      !
  end module test2
  </code></pre>
  
  <p>I put the code in the file t3.f90 and compile as follows</p>
  
  <blockquote>
    <blockquote>
      <p>$gfortran -Wall -O1 -c t3.f90<br>
      t3.f90: In function 'foo1':<br>
      t3.f90:5:0: warning: 't.0' may be used uninitialized in this function [-Wmaybe-uninitialized]<br>
      subroutine foo1(a, t)</p>
    </blockquote>
  </blockquote>
  
  <p>It is very strange that I do not have the same warning with <code>foo2</code>. If I remove the optimization flag, the warning goes away.</p>
  
  <p>I am using gfortran 4.8.2. Is this a bug or my misunderstanding of something? If it is a bug, is it solved in newer version?</p>
  
  <hr>
  
  <p>From the inputs of VladimirF and francescalus, I found it useful to add the following details for those who are familiar with the GCC internals.
  If I change the name <code>t</code> to whatever name <code>xxx</code>, I get the same warning with <code>t.0</code> replaced by <code>xxx.0</code>. That is why I think that the warning is really related to my variable.</p>