From: Harald Anlauf <anlauf@gmx.de>
To: Harald Anlauf <anlauf@gmx.de>
Cc: fortran <fortran@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: *Ping*: [PATCH] PR fortran/96711 - ICE on NINT() Function
Date: Thu, 3 Sep 2020 20:42:24 +0200 [thread overview]
Message-ID: <trinity-1c132f66-19e7-4cc6-a568-6d5b6823bc4f-1599158544006@3c-app-gmx-bs44> (raw)
In-Reply-To: <trinity-06cecfa4-ce9f-4bb9-bbe6-d46877762964-1598303320552@3c-app-gmx-bap04>
*ping*
> Gesendet: Montag, 24. August 2020 um 23:08 Uhr
> Von: "Harald Anlauf" <anlauf@gmx.de>
> An: "fortran" <fortran@gcc.gnu.org>, "gcc-patches" <gcc-patches@gcc.gnu.org>
> Betreff: [PATCH] PR fortran/96711 - ICE on NINT() Function
>
> When rounding a real to integer(16) an ICE happened due to an unhandled
> case in build_round_expr. The attached patch add a special case for this.
>
> I had to change a fold_convert to a convert (which seems to be frontend
> specific stuff), otherwise I would get errors from the generated GIMPLE.
> Does anybody know if this could produce problems elsewhere?
> I'm open to other / better solutions.
>
> Anyway, the patch does regtest cleanly on x86_64-pc-linux-gnu.
>
> OK for master?
>
> Thanks,
> Harald
>
>
> PR fortran/96711 - ICE with NINT() for integer(16) result
>
> When rounding a real to the nearest integer, temporarily convert the real
> argument to a longer real kind when the result is of type/kind integer(16).
>
> gcc/fortran/ChangeLog:
>
> * trans-intrinsic.c (build_round_expr): Use temporary with
> appropriate kind for conversion before rounding to nearest
> integer when the result precision is 128 bits.
>
> gcc/testsuite/ChangeLog:
>
> * gfortran.dg/pr96711.f90: New test.
>
>
next prev parent reply other threads:[~2020-09-03 18:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-24 21:08 Harald Anlauf
2020-09-03 18:42 ` Harald Anlauf [this message]
2020-09-07 5:09 ` *Ping*: " Thomas Koenig
2020-09-07 19:46 ` 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=trinity-1c132f66-19e7-4cc6-a568-6d5b6823bc4f-1599158544006@3c-app-gmx-bs44 \
--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).