2019-04-14  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/87352
	Backport from trunk
	* gfortran.h (gfc_component): Add finalized field.
	* class.c (finalize_component): If the component is already
	finalized, return early.  Set component->finalized on exit.

2019-04-14  Thomas Koenig  <tkoenig@gcc.gnu.org>

	Backport from trunk
	PR fortran/87352
	* gfortran.dg/finalize_28.f90: Adjust count of __builtin_free.
	* gfortran.dg/finalize_34.f90: New test.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@270351 138bc75d-0d04-0410-961f-82ee72b054a4
6 files changed