https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93727
--- Comment #42 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jerry DeLisle <[email protected]>: https://gcc.gnu.org/g:77d5b22efb2b0c291b572f087371d7dc462d5499 commit r17-1487-g77d5b22efb2b0c291b572f087371d7dc462d5499 Author: Jerry DeLisle <[email protected]> Date: Mon May 25 21:13:19 2026 -0700 Fortran: [PR93727] Add EX format READ (read_ex) Implement read_ex in libgfortran to handle EX edit-descriptor input per Fortran 2023 13.7.2.3.6. The input field may contain: * a hexadecimal-significand form (0X<sig>P<exp>) passed directly to the C strtod/strtold family for exact bit-for-bit conversion; * any form acceptable for Fw.d input (decimal fallback), including INF and NAN representations. For decimal input without a decimal point the d field of the EX.w.d descriptor adjusts the exponent exactly as for Fw.d. BN/BZ blank handling and the kP scale factor are also supported via the shared decimal path. Assisted by: Claude Sonnet 4.6 PR fortran/93727 libgfortran/ChangeLog: * io/read.c (read_ex): New function implementing EX format read. * io/io.h (read_ex): Declare. * io/transfer.c (formatted_transfer_scalar_read): Add FMT_EX case dispatching to read_ex. gcc/testsuite/ChangeLog: * gfortran.dg/EXformat_4.F90: New test covering EX format read for kind=4 and 8 (always) and kind=10, 16 (when available): hex-significand literals, lowercase prefix, negative binary exponent, decimal fallback, d-field adjustment, INF/NAN, zero field, and round-trips through write_ex.
