public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kargl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/109066] Segfault when using defined assignment
Date: Thu, 09 Mar 2023 15:33:37 +0000 [thread overview]
Message-ID: <bug-109066-4-CxYFRgQpN6@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109066-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109066
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
--- Comment #3 from kargl at gcc dot gnu.org ---
(In reply to Paul Thomas from comment #2)
> Hi Andrew,
>
> Thanks for the report. However, IMHO the code is invalid since the result of
> hdf5Constructor is not defined.
>
> function hdf5Constructor() result(self)
> implicit none
> type(hdf5Object) :: self
> self = hdf5Object (resourceManager())
> return
> end function hdf5Constructor
>
> works a treat.
>
> If there is a requirement in the standard that a function result such as
> this be initialised, I am unable to find it in the F2018 standard.
>
> Paul
F2018, page 319.
If the function result is not a pointer, its value shall be defined by
the function. If the function result is a pointer, on return the pointer
association status of the function result shall not be undefined.
next prev parent reply other threads:[~2023-03-09 15:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 18:17 [Bug fortran/109066] New: " abensonca at gcc dot gnu.org
2023-03-09 8:04 ` [Bug fortran/109066] " pault at gcc dot gnu.org
2023-03-09 13:56 ` pault at gcc dot gnu.org
2023-03-09 15:33 ` kargl at gcc dot gnu.org [this message]
2023-03-10 8:12 ` paul.richard.thomas at gmail 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-109066-4-CxYFRgQpN6@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).