https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96580
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:b77691a90fc8a7e917417ce747bf78669304f951 commit r14-6665-gb77691a90fc8a7e917417ce747bf78669304f951 Author: Harald Anlauf <anl...@gmx.de> Date: Mon Dec 18 18:59:02 2023 +0100 Fortran: update DATE_AND_TIME intrinsic for Fortran 2018 [PR96580] Fortran 2018 allows a non-default integer kind for its VALUES argument if it has a decimal exponent range of at least four. Update checks, library implementation and documentation. gcc/fortran/ChangeLog: PR fortran/96580 * check.cc (array_size_check): New helper function. (gfc_check_date_and_time): Use it for checking minimum size of VALUES argument. Update kind check to Fortran 2018. * intrinsic.texi: Fix documentation of DATE_AND_TIME. libgfortran/ChangeLog: PR fortran/96580 * intrinsics/date_and_time.c (date_and_time): Handle VALUES argument for kind=2 and kind=16 (if available). gcc/testsuite/ChangeLog: PR fortran/96580 * gfortran.dg/date_and_time_2.f90: New test. * gfortran.dg/date_and_time_3.f90: New test. * gfortran.dg/date_and_time_4.f90: New test.