From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10443 invoked by alias); 9 Jul 2007 22:03:25 -0000 Received: (qmail 10401 invoked by uid 48); 9 Jul 2007 22:03:16 -0000 Date: Mon, 09 Jul 2007 22:03:00 -0000 Message-ID: <20070709220316.10400.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/29459] Spurious warning about uninitialized optional arguments In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "fxcoudert at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-07/txt/msg01145.txt.bz2 ------- 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: ‘’ 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