public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "anlauf at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/112459] gfortran -w option causes derived-type finalization at creation time
Date: Thu, 09 Nov 2023 17:46:06 +0000	[thread overview]
Message-ID: <bug-112459-4-0KJosIxXSO@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112459-4@http.gcc.gnu.org/bugzilla/>

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pault at gcc dot gnu.org

--- Comment #1 from anlauf at gcc dot gnu.org ---
When I compile the code with -std=f2008, I get:

pr112459.f90:28:13:

   28 |   allocate(c)
      |             1
Warning: The structure constructor at (1) has been finalized. This feature was
removed by f08/0011. Use -std=f2018 or -std=gnu to eliminate the finalization.

It behaves as you expect if I specify -std=gnu or -std=f2018.

Trying several combinations, it appears the following variants work:

-std=gnu
-std=f2018
-std=f2018 -w

and these "fail":

-w
-std=f2008
-std=f2008 -w
-std=gnu -w

Note that default is -std=gnu .

Now I wonder how -w interferes with -std=gnu ...

  reply	other threads:[~2023-11-09 17:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09 13:50 [Bug fortran/112459] New: " bardeau at iram dot fr
2023-11-09 17:46 ` anlauf at gcc dot gnu.org [this message]
2023-11-09 18:18 ` [Bug fortran/112459] " pault at gcc dot gnu.org
2023-11-11 10:17 ` pault at gcc dot gnu.org
2023-12-16 13:59 ` 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-112459-4-0KJosIxXSO@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).