public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/29459]  New: Spurious warning about uninitialized optional arguments
@ 2006-10-13 14:16 vivekrao4 at yahoo dot com
  2006-11-25 19:41 ` [Bug fortran/29459] " fxcoudert at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: vivekrao4 at yahoo dot com @ 2006-10-13 14:16 UTC (permalink / raw)
  To: gcc-bugs

gfortran -c -Wall -O1 gfort_warnings.f90 

using gcc version 4.2.0 20061011 (experimental) on Windows XP

for the code

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

produces the spurious warnings
gfort_warnings.f90: In function 'print_sub':
gfort_warnings.f90:4: warning: 'stride.1' may be used uninitialized in this
function
gfort_warnings.f90:4: warning: 'ubound.0' may be used uninitialized in this
function
gfort_warnings.f90:4: warning: 'labels.0' may be used uninitialized in this
function
gfort_warnings.f90:4: warning: '<anonymous>' may be used uninitialized in this
function


-- 
           Summary: Spurious warning about uninitialized optional arguments
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: vivekrao4 at yahoo dot com


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-08-15 12:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-13 14:16 [Bug fortran/29459] New: Spurious warning about uninitialized optional arguments vivekrao4 at yahoo dot com
2006-11-25 19:41 ` [Bug fortran/29459] " fxcoudert at gcc dot gnu dot org
2007-01-31 23:15 ` fxcoudert at gcc dot gnu dot org
2007-07-04  7:44 ` fxcoudert at gcc dot gnu dot org
2007-07-04  7:44 ` fxcoudert at gcc dot gnu dot org
2007-07-04  7:50 ` fxcoudert at gcc dot gnu dot org
2007-07-09 22:01 ` fxcoudert at gcc dot gnu dot org
2007-07-09 22:03 ` fxcoudert at gcc dot gnu dot org
2007-08-14 14:10 ` fxcoudert at gcc dot gnu dot org
2007-08-14 15:26 ` fxcoudert at gcc dot gnu dot org
2007-08-15  9:16 ` [Bug fortran/29459] Spurious warnings about anonymous variables fxcoudert at gcc dot gnu dot org
2007-08-15 12:39 ` fxcoudert at gcc dot gnu dot org
2007-08-15 12:40 ` fxcoudert at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).