public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paul Richard Thomas <paul.richard.thomas@gmail.com>
To: Harald Anlauf <anlauf@gmx.de>
Cc: fortran <fortran@gcc.gnu.org>
Subject: Re: Scalarization of simplification of constant expressions?
Date: Tue, 6 Oct 2020 06:44:23 +0100	[thread overview]
Message-ID: <CAGkQGiKP9hX6HCoh3uon6y2FY9BAUkxe6Xfo1gdP04c5pBLytQ@mail.gmail.com> (raw)
In-Reply-To: <trinity-d8338926-47eb-44cb-9170-430522289a09-1601927957375@3c-app-gmx-bap74>

Hi Harald,

Yes, there is a scalarizer for elemental calls:
expr.c(scalarize_intrinsic_call) first appears in 2007.

Cheers

Paul


On Mon, 5 Oct 2020 at 20:59, Harald Anlauf <anlauf@gmx.de> wrote:

> Dear all,
>
> the restrictions on what can be used in constant expressions have been
> greatly reduced in F2018, so one might want to simplify more than what
> was possible before.
>
> E.g. the following is currently not simplified at compile time:
>
>   print *, index('abcd',['c'], .true. )
>   print *, index('abcd', 'b' ,[.true.])
>
> c.f. PR95979, while the scalar variants do simplify.
>
> Is there something like scalarization also available for simplification
> of constant expressions?
>
> Regards,
> Harald
>
>

-- 
"If you can't explain it simply, you don't understand it well enough" -
Albert Einstein

  reply	other threads:[~2020-10-06  5:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05 19:59 Harald Anlauf
2020-10-06  5:44 ` Paul Richard Thomas [this message]
2020-10-06 21:34   ` Aw: " Harald Anlauf

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=CAGkQGiKP9hX6HCoh3uon6y2FY9BAUkxe6Xfo1gdP04c5pBLytQ@mail.gmail.com \
    --to=paul.richard.thomas@gmail.com \
    --cc=anlauf@gmx.de \
    --cc=fortran@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).