re PR fortran/48351 ([OOP] Realloc on assignment fails if parent component is CLASS)
authorPaul Thomas <pault@gcc.gnu.org>
Fri, 13 Jan 2012 20:42:01 +0000 (20:42 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Fri, 13 Jan 2012 20:42:01 +0000 (20:42 +0000)
commitd6430d9a0c02cac4655cedd1e489ad1ea08dffb2
tree07819544bb4329a28bcdd3999adbd130affead4b
parent04771457dcb662ecb0cab80e5f432ab5827f6ec4
re PR fortran/48351 ([OOP]  Realloc on assignment fails if parent component is CLASS)

2012-01-13  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-13  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.

From-SVN: r183162
gcc/fortran/ChangeLog
gcc/fortran/class.c
gcc/fortran/trans-array.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/alloc_comp_assign_12.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/allocatable_scalar_9.f90