public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: fortran@gcc.gnu.org
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] PR fortran/87851 - [9/10/11/12 Regression] Wrong return type for len_trim
Date: Mon, 22 Nov 2021 22:09:18 +0100	[thread overview]
Message-ID: <snh0u2$13qv$1@ciao.gmane.io> (raw)
In-Reply-To: <20211122213031.31b6c3ba@nbbrfq>

Am 22.11.21 um 21:30 schrieb Bernhard Reutner-Fischer via Fortran:
> On Mon, 22 Nov 2021 19:17:51 +0100
> Harald Anlauf via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
> 
>> Am 21.11.21 um 12:46 schrieb Mikael Morin:
>>> Le 19/11/2021 à 20:47, Harald Anlauf via Fortran a écrit :
>>>> Dear Fortranners,
>>>>
>>>> scalariziation of the elemental intrinsic LEN_TRIM was ICEing
>>>> when the optional KIND argument was present.
>>>>
>>>> The cleanest solution is to use the infrastructure added by
>>>> Mikael's fix for PR97896.  In that case it is a 1-liner.  :-)
> 
> I'm just wondering loud if it would be more convenient to have a
> unsigned hidden_arg:1 bit in let's say gfc_actual_arglist that denotes
> if the argument should be const eval'ed and used before, and, most
> importantly not passed to the library. We seem to have more than just
> the index intrinsic's kind arg in that boat. And from what i read,
> powerpc will eventuall want to select quite some kind-specific library
> functions soon, depending on how this part is implemented..

Well, that does not make sense for KIND, which has to be constant.
We even have an appropriate check for this in check.c(kind_check).

And KIND may even select a special library function, which means
that KIND cannot be an ordinary function argument.

> Maybe add SPEC_HIDDEN_ARG / SPEC_LIBRARY_SELECTOR additional
> gfc_param_spec_type if a separate bit is deemed inappropriate.
> 
> Such a hidden_arg/library_selector/non_library_call_arg flag is maybe
> better than matching individual functions and strcmp the arg name.
> 
> cheers,
> 



  reply	other threads:[~2021-11-22 21:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19 19:47 Harald Anlauf
2021-11-21 11:46 ` Mikael Morin
2021-11-22 18:17   ` Harald Anlauf
2021-11-22 18:17     ` Harald Anlauf
2021-11-22 20:30     ` Bernhard Reutner-Fischer
2021-11-22 21:09       ` Harald Anlauf [this message]
2021-11-23 11:55       ` Mikael Morin

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='snh0u2$13qv$1@ciao.gmane.io' \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@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).