public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tschwinge at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/102192] New: Curious '-O2'-only '-Wmaybe-uninitialized' diagnostics for 'libgomp.oacc-fortran/routine-10.f90'
Date: Fri, 03 Sep 2021 14:59:44 +0000	[thread overview]
Message-ID: <bug-102192-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 102192
           Summary: Curious '-O2'-only '-Wmaybe-uninitialized' diagnostics
                    for 'libgomp.oacc-fortran/routine-10.f90'
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
                CC: burnus at gcc dot gnu.org
            Blocks: 24639
  Target Milestone: ---

The 'libgomp.oacc-fortran/routine-10.f90' test case as originally added in
commit 12df77ab6df4b91d4770240bcc4ab443e4bb18b9 shows curious
'-Wmaybe-uninitialized' diagnostics.  Now, of course this is
'-Wmaybe-uninitialized', so may easily be dismissed "don't care", but maybe
there's something to be improved here?

For standard host compilation (no '-fopenacc'), but only with '-O2', we get
diagnosed:

    libgomp.oacc-fortran/routine-10.f90:28:21: Warning: ‘c’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
    libgomp.oacc-fortran/routine-10.f90:21:50: note: ‘c’ was declared here
    libgomp.oacc-fortran/routine-10.f90:46:30: Warning: ‘c’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
    libgomp.oacc-fortran/routine-10.f90:21:50: note: ‘c’ was declared here

Not seeing this with any other '-O[...]' level, and also goes away with '-O2
-fno-inline', for example.  Have not quickly been able to reproduce with '-O3'
plus various '-fno-[...].


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639
[Bug 24639] [meta-bug] bug to track all Wuninitialized issues

             reply	other threads:[~2021-09-03 14:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 14:59 tschwinge at gcc dot gnu.org [this message]
2021-10-06 16:44 ` [Bug tree-optimization/102192] " msebor at gcc dot gnu.org
2022-01-13 10:52 ` cvs-commit 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-102192-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).