Skip to content
Snippets Groups Projects
Commit 3b67db31 authored by Haochen Gui's avatar Haochen Gui
Browse files

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: default avatarTobias Burnus <tobias@codesourcery.com>
parent 08ef17c7
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment