public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/57127] New: gfortran gives unintended warning on uninitialized optional dummy array of undetermined size
@ 2013-04-30 17:34 AstroFloyd at gmail dot com
  2013-04-30 20:57 ` [Bug fortran/57127] " AstroFloyd at gmail dot com
  0 siblings, 1 reply; 2+ messages in thread
From: AstroFloyd at gmail dot com @ 2013-04-30 17:34 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 57127
           Summary: gfortran gives unintended warning on uninitialized
                    optional dummy array of undetermined size
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: AstroFloyd@gmail.com


Created attachment 29985
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29985
Source file example.f90 used in the example in the bug report

gfortran-4.7.2 -O1 -Wall gives unintended warning about uninitialized array
elements when a routine is called with an optional dummy array of undetermined
size (example.f90 is attached below):

$ gfortran -O1 -Wall example.f90 -o example && ./example
example.f90: In function ‘example_routine’:
example.f90:8:0: warning: ‘array.0’ may be used uninitialized in this function
[-Wmaybe-uninitialized]

Expected behaviour: no warning message.

The warning goes away when:
  * -O0 is used rather than -O1 or higher
  * -Wall is replaced by -Wmaybe-uninitialized
  * the line  write(op,'(A)') 'foo'  is commented out
>From gcc-bugs-return-421304-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Apr 30 17:51:53 2013
Return-Path: <gcc-bugs-return-421304-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 4180 invoked by alias); 30 Apr 2013 17:51:53 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 4152 invoked by uid 48); 30 Apr 2013 17:51:50 -0000
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/57127] gfortran gives unintended warning on uninitialized optional dummy array of undetermined size
Date: Tue, 30 Apr 2013 17:51:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dominiq at lps dot ens.fr
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields: Status Last reconfirmed Ever Confirmed
Message-ID: <bug-57127-4-JF8GFCNI3v@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57127-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57127-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg02449.txt.bz2
Content-length: 571


http://gcc.gnu.org/bugzilla/show_bug.cgi?idW127

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-04-30
     Ever Confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2013-04-30 17:51:49 UTC ---
The warning is present for 4.6, 4.7, 4.8, and trunk.


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

* [Bug fortran/57127] gfortran gives unintended warning on uninitialized optional dummy array of undetermined size
  2013-04-30 17:34 [Bug fortran/57127] New: gfortran gives unintended warning on uninitialized optional dummy array of undetermined size AstroFloyd at gmail dot com
@ 2013-04-30 20:57 ` AstroFloyd at gmail dot com
  0 siblings, 0 replies; 2+ messages in thread
From: AstroFloyd at gmail dot com @ 2013-04-30 20:57 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from AstroFloyd <AstroFloyd at gmail dot com> 2013-04-30 20:57:55 UTC ---
Hmmm, this looks very strongly like
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52370 but is not identical(?)


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

end of thread, other threads:[~2013-04-30 20:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-30 17:34 [Bug fortran/57127] New: gfortran gives unintended warning on uninitialized optional dummy array of undetermined size AstroFloyd at gmail dot com
2013-04-30 20:57 ` [Bug fortran/57127] " AstroFloyd at gmail dot com

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).