public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "johnsonsr at ornl dot gov" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/56670] Allocatable-length character var causes bogus warning with -Wuninitialized
Date: Thu, 10 Jun 2021 17:19:45 +0000	[thread overview]
Message-ID: <bug-56670-4-WVPQpKzJZm@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56670-4@http.gcc.gnu.org/bugzilla/>

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

Seth Johnson <johnsonsr at ornl dot gov> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |johnsonsr at ornl dot gov

--- Comment #11 from Seth Johnson <johnsonsr at ornl dot gov> ---
I confirm that with both 10.2 and 8.3, the example code prints the erroneous
warning with `-O0` and works as expected (no warning) with `-O1` and higher.

```
$FC "-Wall" -O1 -c ./ftest.f90
```

```fortran
subroutine do_stuff()
    character(len=*), parameter :: src = "nope"
    character(len=:), allocatable :: dst
    dst = src
    write(*,*) dst
end subroutine
```

  parent reply	other threads:[~2021-06-10 17:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20 20:39 [Bug fortran/56670] New: Allocatable-length character var causes bogus warning with -Wall townsend at astro dot wisc.edu
2014-03-22 15:46 ` [Bug fortran/56670] " dominiq at lps dot ens.fr
2015-08-07 20:26 ` mikael at gcc dot gnu.org
2021-03-26 16:51 ` [Bug fortran/56670] Allocatable-length character var causes bogus warning with -Wuninitialized msebor at gcc dot gnu.org
2021-06-10 17:19 ` johnsonsr at ornl dot gov [this message]
2021-07-01 15:33 ` burnus at gcc dot gnu.org
2021-12-10  1:16 ` vivekrao4 at yahoo dot com

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-56670-4-WVPQpKzJZm@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).