Skip to content
Snippets Groups Projects
Commit d64ca153 authored by Paul Thomas's avatar Paul Thomas
Browse files

Fortran: Fix error recovery for bad component arrayspecs [PR108434]

2025-01-11  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran/
	PR fortran/108434
	* class.cc (generate_finalization_wrapper): To avoid memory
	leaks from callocs, return immediately if the derived type
	error flag is set.
	* decl.cc (build_struct): If the declaration of a derived type
	or class component does not have a deferred arrayspec, correct,
	set the error flag of the derived type and emit an immediate
	error.

gcc/testsuite/
	PR fortran/108434
	* gfortran.dg/pr108434.f90 : Add tests from comment 1.
parent 664bd76a
No related branches found
No related tags found
No related merge requests found
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