*ping*

> Gesendet: Montag, 24. August 2020 um 23:08 Uhr
> Von: "Harald Anlauf" <anl...@gmx.de>
> An: "fortran" <fort...@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.
>
>

Reply via email to