diff options
author | Harald Anlauf <anlauf@gmx.de> | 2025-01-12 19:26:35 +0100 |
---|---|---|
committer | Harald Anlauf <anlauf@gmx.de> | 2025-01-12 19:26:35 +0100 |
commit | f8eda60e12dabaf5e9501104781ef5eba334cff7 (patch) | |
tree | cb38728434af759ebccede0de5c53642c09c29fd /gcc/c | |
parent | ed8cd42d138fa048e0c0eff1ea28b39f5abe1c29 (diff) | |
download | gcc-f8eda60e12dabaf5e9501104781ef5eba334cff7.zip gcc-f8eda60e12dabaf5e9501104781ef5eba334cff7.tar.gz gcc-f8eda60e12dabaf5e9501104781ef5eba334cff7.tar.bz2 |
Fortran: implement F2018 intrinsic OUT_OF_RANGE [PR115788]
Implementation of the Fortran 2018 standard intrinsic OUT_OF_RANGE, with
the GNU Fortran extension to unsigned integers.
Runtime code is fully inline expanded.
PR fortran/115788
gcc/fortran/ChangeLog:
* check.cc (gfc_check_out_of_range): Check arguments to intrinsic.
* expr.cc (free_expr0): Fix a memleak with unsigned literals.
* gfortran.h (enum gfc_isym_id): Define GFC_ISYM_OUT_OF_RANGE.
* gfortran.texi: Add OUT_OF_RANGE to list of intrinsics supporting
UNSIGNED.
* intrinsic.cc (add_functions): Add Fortran prototype. Break some
nearby lines with excessive length.
* intrinsic.h (gfc_check_out_of_range): Add prototypes.
* intrinsic.texi: Fortran documentation of OUT_OF_RANGE.
* simplify.cc (gfc_simplify_out_of_range): Compile-time simplification
of OUT_OF_RANGE.
* trans-intrinsic.cc (gfc_conv_intrinsic_out_of_range): Generate
inline expansion of runtime code for OUT_OF_RANGE.
(gfc_conv_intrinsic_function): Use it.
gcc/testsuite/ChangeLog:
* gfortran.dg/ieee/out_of_range.f90: New test.
* gfortran.dg/out_of_range_1.f90: New test.
* gfortran.dg/out_of_range_2.f90: New test.
* gfortran.dg/out_of_range_3.f90: New test.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions