public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "juergen.reuter at desy dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/101199] program changes the value of a dummy argument
Date: Fri, 25 Jun 2021 13:45:19 +0000 [thread overview]
Message-ID: <bug-101199-4-Mg8ckDioqi@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101199-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101199
--- Comment #5 from Jürgen Reuter <juergen.reuter at desy dot de> ---
(In reply to ygal klein from comment #4)
>)
>
> Thank you for the reply.
>
> After posting the bug report - I saw that implementing (inout) as your
> number 1 suggestion - dodges the problem - though as you mentioned having
> inout for this in an init routine is somewhat unnatural.
>
> The 2nd suggestion is something that I was trying to avoid in the first
> place - i.e copying a whole type (this minimal example is a small type - but
> originally it is a type with a lot of instances and procedures)
>
> In fact - I could have had advance as a function that returns a type - but
> then I would be paying the price of copyin assignment of a big type.
>
> Anyway - you conclude that gfortran is behaving as it should and that the
> fact that ifort works - is somewhat a coincidence?
Let's see what the gfortran developers have to say about this. In any case it
looks strange if you try to call an init routine from a different TBP of the
same object. An init routine is usually called only at the very instantiation
of the object. If you want a shallow copy then you need a pointer.
next prev parent reply other threads:[~2021-06-25 13:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-24 19:37 [Bug fortran/101199] New: " ygalklein at gmail dot com
2021-06-25 5:55 ` [Bug fortran/101199] " ygalklein at gmail dot com
2021-06-25 5:59 ` ygalklein at gmail dot com
2021-06-25 13:17 ` juergen.reuter at desy dot de
2021-06-25 13:33 ` ygalklein at gmail dot com
2021-06-25 13:45 ` juergen.reuter at desy dot de [this message]
2021-07-12 14:58 ` tkoenig at gcc dot gnu.org
2021-07-12 16:26 ` tkoenig 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-101199-4-Mg8ckDioqi@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).