diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2012-01-13 20:42:01 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2012-01-13 20:42:01 +0000 |
commit | d6430d9a0c02cac4655cedd1e489ad1ea08dffb2 (patch) | |
tree | 07819544bb4329a28bcdd3999adbd130affead4b /gcc/fortran/class.c | |
parent | 04771457dcb662ecb0cab80e5f432ab5827f6ec4 (diff) | |
download | gcc-d6430d9a0c02cac4655cedd1e489ad1ea08dffb2.zip gcc-d6430d9a0c02cac4655cedd1e489ad1ea08dffb2.tar.gz gcc-d6430d9a0c02cac4655cedd1e489ad1ea08dffb2.tar.bz2 |
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
Diffstat (limited to 'gcc/fortran/class.c')
-rw-r--r-- | gcc/fortran/class.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c index 37c653a..a17fc0a 100644 --- a/gcc/fortran/class.c +++ b/gcc/fortran/class.c @@ -432,6 +432,7 @@ gfc_build_class_symbol (gfc_typespec *ts, symbol_attribute *attr, } fclass->attr.extension = ts->u.derived->attr.extension + 1; + fclass->attr.alloc_comp = ts->u.derived->attr.alloc_comp; fclass->attr.is_class = 1; ts->u.derived = fclass; attr->allocatable = attr->pointer = attr->dimension = attr->codimension = 0; |