diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2018-03-11 22:25:11 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2018-03-11 22:25:11 +0000 |
commit | 26219cee84430d38c60637b6fcfffcee80e11c14 (patch) | |
tree | 967c16a73c8b9dd9bc89ae8e0c84a1baf6462d69 /gcc/fortran/trans.h | |
parent | 1813c97a6fd41062e5154e1fb0e7e2cc762306a5 (diff) | |
download | gcc-26219cee84430d38c60637b6fcfffcee80e11c14.zip gcc-26219cee84430d38c60637b6fcfffcee80e11c14.tar.gz gcc-26219cee84430d38c60637b6fcfffcee80e11c14.tar.bz2 |
re PR fortran/84546 (Bad sourced allocation of CLASS(*) with source with CLASS(*) component)
2018-03-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84546
* trans-array.c (structure_alloc_comps): Make sure that the
vptr is copied and that the unlimited polymorphic _len is used
to compute the size to be allocated.
* trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
unlimited polymorphic _len for the offset to the element.
(gfc_copy_class_to_class): Set the new 'unlimited' argument.
* trans.h : Add the boolean 'unlimited' to the prototype.
2018-03-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84546
* gfortran.dg/unlimited_polymorphic_29.f90 : New test.
From-SVN: r258438
Diffstat (limited to 'gcc/fortran/trans.h')
-rw-r--r-- | gcc/fortran/trans.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h index 2ada805..1bd8206 100644 --- a/gcc/fortran/trans.h +++ b/gcc/fortran/trans.h @@ -431,7 +431,7 @@ tree gfc_vptr_deallocate_get (tree); void gfc_reset_vptr (stmtblock_t *, gfc_expr *); void gfc_reset_len (stmtblock_t *, gfc_expr *); tree gfc_get_vptr_from_expr (tree); -tree gfc_get_class_array_ref (tree, tree, tree); +tree gfc_get_class_array_ref (tree, tree, tree, bool); tree gfc_copy_class_to_class (tree, tree, tree, bool); bool gfc_add_finalizer_call (stmtblock_t *, gfc_expr *); bool gfc_add_comp_finalizer_call (stmtblock_t *, tree, gfc_component *, bool); |