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/110825] TYPE(*) dummy argument to generate an unused hidden argument
Date: Wed, 26 Jul 2023 20:54:01 +0000	[thread overview]
Message-ID: <bug-110825-4-onqRb0qQys@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110825-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from anlauf at gcc dot gnu.org ---
(In reply to kargl from comment #0)
> Thus, when compiled and executed the program hits 'STOP 1'.  Likely,
> gfortran needs to add a possibly unused hidden argument to the argument list
> for a TYPE(*) dummy argument.

I guess it should be the other way around: if the dummy argument is TPYE(*),
we only pass a reference to the actual argument, but no hidden argument,
as is the case for bind(c).  This is also what the called procedure expects.
What if the caller passed a type other than character?

So we just need to update the caller (the "monster" gfc_conv_procedure_call).

Do you have an idea what would be the use of the hidden argument here anyway?

As TYPE(*) is rather new, and I did not find any mentioning of it in the
ABI specification, we should clarify what we want and also document it at

https://gcc.gnu.org/onlinedocs/gfortran/Argument-passing-conventions.html

  parent reply	other threads:[~2023-07-26 20:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26 20:17 [Bug fortran/110825] New: " kargl at gcc dot gnu.org
2023-07-26 20:17 ` [Bug fortran/110825] " kargl at gcc dot gnu.org
2023-07-26 20:54 ` anlauf at gcc dot gnu.org [this message]
2023-07-26 21:18 ` anlauf at gcc dot gnu.org
2023-07-26 22:00 ` sgk at troutmask dot apl.washington.edu
2023-07-27 19:41 ` anlauf at gcc dot gnu.org
2023-07-28 18:40 ` cvs-commit at gcc dot gnu.org
2023-07-30 18:28 ` cvs-commit at gcc dot gnu.org
2023-08-17 20:28 ` anlauf 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-110825-4-onqRb0qQys@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).