public inbox for
 help / color / mirror / Atom feed
From: Mikael Morin <>
To: Harald Anlauf <>, fortran <>,
	gcc-patches <>
Subject: Re: [PATCH] Fortran: ABI for scalar CHARACTER(LEN=1),VALUE dummy argument [PR110360]
Date: Fri, 23 Jun 2023 10:04:49 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <trinity-67cbfb46-d186-40df-86e8-fb36979a34a9-1687465404920@3c-app-gmx-bs06>

Le 22/06/2023 à 22:23, Harald Anlauf via Fortran a écrit :
> Dear all,
> gfortran's ABI specifies that actual arguments to CHARACTER(LEN=1),VALUE
> dummy arguments are passed by value in the scalar case.  That did work
> for constant strings being passed, but not in several other cases, where
> pointers were passed, resulting in subsequent random junk...
> The attached patch fixes this for the case of a non-constant string
> argument.
> It does not touch the character,value bind(c) case - this is a different
> thing and may need separate work, as Mikael pointed out - and there is
> a missed optimization for the case of actual constant string arguments
> of length larger than 1: it appears that the full string is pushed to
> the stack.  I did not address that, as the primary aim here is to get
> correctly working code.  (I added a TODO in a comment.)
> Regtested on x86_64-pc-linux-gnu.  OK for mainline?
OK, thanks.

> Thanks,
> Harald

      reply	other threads:[~2023-06-23  8:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22 20:23 Harald Anlauf
2023-06-23  8:04 ` Mikael Morin [this message]

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* 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).