public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/102192] New: Curious '-O2'-only '-Wmaybe-uninitialized' diagnostics for 'libgomp.oacc-fortran/routine-10.f90'
@ 2021-09-03 14:59 tschwinge at gcc dot gnu.org
  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
  0 siblings, 2 replies; 3+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2021-09-03 14:59 UTC (permalink / raw)
  To: gcc-bugs

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

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

end of thread, other threads:[~2022-01-13 10:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-03 14:59 [Bug tree-optimization/102192] New: Curious '-O2'-only '-Wmaybe-uninitialized' diagnostics for 'libgomp.oacc-fortran/routine-10.f90' tschwinge at gcc dot gnu.org
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

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