https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103628
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by HaoChen Gui <guih...@gcc.gnu.org>: https://gcc.gnu.org/g:3b67db31236631432e7f6d74ed49af9ae2183a4d commit r13-6843-g3b67db31236631432e7f6d74ed49af9ae2183a4d Author: Haochen Gui <guih...@gcc.gnu.org> Date: Fri Mar 24 10:45:52 2023 +0800 Fortran: Escalate failure when Hollerith constant to real conversion fails gcc/fortran/ PR target/103628 * target-memory.cc (gfc_interpret_float): Return FAIL when native_interpret_expr gets a NULL tree. * arith.cc (gfc_hollerith2real): Return NULL when gfc_interpret_float fails. * error.cc (gfc_buffered_p): Define. * gfortran.h (gfc_buffered_p): Declare. * intrinsic.cc: Add diagnostic.h to include list. (do_simplify): Save errorcount and check it at finish. Report a "Cannot simplify expression" error on a bad result if error count doesn't change and no other errors buffered. gcc/testsuite/ PR target/103628 * gfortran.dg/assumed_size_refs_2.f90: Check "Cannot simplify expression" error. * gfortran.dg/unpack_field_1.f90: Likewise. * gfortran.dg/pr103628.f90: New. Co-Authored-By: Tobias Burnus <tob...@codesourcery.com>