public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mario-baumann at web dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/66459] New: bogus warning 'w.offset' may be used uninitialized in this function [-Wmaybe-uninitialized]
Date: Mon, 08 Jun 2015 11:02:00 -0000	[thread overview]
Message-ID: <bug-66459-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66459

            Bug ID: 66459
           Summary: bogus warning 'w.offset' may be used uninitialized in
                    this function [-Wmaybe-uninitialized]
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mario-baumann at web dot de
  Target Milestone: ---

Created attachment 35716
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35716&action=edit
Fortran Fixed Form File

Hi All,

The attached file generates bogus warnings if compiled with -Wall AND -O1(or
higher optimizations).


> gfortran -c -Wall -O1 foo.F
foo.F:14:0:

                W(J,I) = 0
 ^
Warning: 'w.offset' may be used uninitialized in this function
[-Wmaybe-uninitialized]
foo.F:14:0: Warning: 'w.dim[1].stride' may be used uninitialized in this
function [-Wmaybe-uninitialized]


> gfortran -v
Using built-in specs.
COLLECT_GCC=./gfortran
COLLECT_LTO_WRAPPER=/Build/gcc/5.1.0/install/libexec/gcc/x86_64-apple-darwin13/5.1.0/lto-wrapper
Target: x86_64-apple-darwin13
Configured with: /Source/gcc/5.1.0/configure --prefix=/Build/gcc/5.1.0/install
--build=x86_64-apple-darwin13 --enable-languages=c,c++,fortran,lto
--enable-cloog-backend=isl --enable-stage1-checking --enable-lto
--enable-libstdcxx-time --with-system-zlib --disable-cloog-version-check
--disable-nls --disable-libquadmath-support
Thread model: posix
gcc version 5.1.0 (GCC)


NOTEs:
- -O0 works fine
- same behaviour with gcc-4.9.2


             reply	other threads:[~2015-06-08 11:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-08 11:02 mario-baumann at web dot de [this message]
2015-06-08 14:46 ` [Bug fortran/66459] " mikael at gcc dot gnu.org
2022-08-30  8:54 ` [Bug tree-optimization/66459] bogus warning 'w.offset' may be used uninitialized in this function [-Wmaybe-uninitialized] caused by loop invariant motion (LIM) rguenth at gcc dot gnu.org
2023-07-11 16:27 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-66459-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).