https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108434
--- Comment #15 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Paul Thomas <pa...@gcc.gnu.org>: https://gcc.gnu.org/g:d64ca15351029164bac30b49fb3c4f9723e755de commit r15-6820-gd64ca15351029164bac30b49fb3c4f9723e755de Author: Paul Thomas <pa...@gcc.gnu.org> Date: Sat Jan 11 08:23:48 2025 +0000 Fortran: Fix error recovery for bad component arrayspecs [PR108434] 2025-01-11 Paul Thomas <pa...@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.