[Patch, fortran] PR48351 - [OOP] Realloc on assignment fails if parent component is CLASS

Tobias Burnus burnus@net-b.de
Fri Jan 13 15:51:00 GMT 2012


On 01/13/2012 04:29 PM, Paul Richard Thomas wrote:
> Bootstrapped and regtested on i686/Ubuntu10.04 - OK for trunk?

OK. Thanks for the patch!

Good that we have __builtin_free counting test cases, which helps to 
detect such issues.

Tobias

> 2012-01-12  Paul Thomas<pault@gcc.gnu.org>
>
> 	PR fortran/48351
> 	* trans-array.c (structure_alloc_comps): Suppress interative
> 	call to self, when current component is deallocated using
> 	gfc_trans_dealloc_allocated.
> 	* class.c (gfc_build_class_symbol): Copy the 'alloc_comp'
> 	attribute from the declared type to the class structure.
>
> 2012-01-12  Paul Thomas<pault@gcc.gnu.org>
>
> 	PR fortran/48351
> 	* gfortran.dg/alloc_comp_assign.f03: New.
> 	* gfortran.dg/allocatable_scalar_9.f90: Reduce count of
> 	__BUILTIN_FREE from 38 to 32.



More information about the Gcc-patches mailing list