This is the mail archive of the gcc-bugs@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]

[Bug fortran/29459] Spurious warning about uninitialized optional arguments



------- Comment #6 from fxcoudert at gcc dot gnu dot org  2007-07-09 22:03 -------
With the initial testcase:

module foo_mod
implicit none
contains
subroutine print_sub(fmt_acf,iu,labels)
character (len=*), intent(in), optional :: fmt_acf
integer          , intent(in), optional :: iu
character (len=*), intent(in), optional :: labels(:)
if (present(iu)) then
   print*,iu
end if
if (present(fmt_acf)) then
   print*,fmt_acf
end if
if (present(labels)) then
   write (*,*) labels
end if
end subroutine print_sub
!
end module foo_mod

we still have the following warning with -O1 -Wall:
u.f90: In function ?print_sub?:
u.f90:4: warning: ?<anonymous>? may be used uninitialized in this function


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|fxcoudert at gcc dot gnu dot|unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW
           Keywords|patch                       |


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


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