diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2016-01-31 10:22:05 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2016-01-31 10:22:05 +0000 |
commit | 0c221916d67f27c903415581260d9d975d2b3578 (patch) | |
tree | 891070a190f33e067e9d830132859d2fec4a09da /gcc/fortran/trans-expr.c | |
parent | 03e79d4fa1491a97e9d3b3b9a994cb11a9784e30 (diff) | |
download | gcc-0c221916d67f27c903415581260d9d975d2b3578.zip gcc-0c221916d67f27c903415581260d9d975d2b3578.tar.gz gcc-0c221916d67f27c903415581260d9d975d2b3578.tar.bz2 |
re PR fortran/67564 (Segfault on sourced allocattion statement with class(*) arrays)
2016-01-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/67564
* trans-expr.c (gfc_conv_procedure_call): For the vtable copy
subroutines, add a string length argument, when the actual
argument is an unlimited polymorphic class object.
2016-01-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/67564
* gfortran.dg/allocate_with_source_17.f03: New test.
From-SVN: r233016
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r-- | gcc/fortran/trans-expr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 74f519e..08b20e6 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -5621,7 +5621,8 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, if (sym->name[0] == '_' && e && e->ts.type == BT_CHARACTER && strncmp (sym->name, "__vtab_CHARACTER", 16) == 0 && arg->next && arg->next->expr - && arg->next->expr->ts.type == BT_DERIVED + && (arg->next->expr->ts.type == BT_DERIVED + || arg->next->expr->ts.type == BT_CLASS) && arg->next->expr->ts.u.derived->attr.unlimited_polymorphic) vec_safe_push (stringargs, parmse.string_length); |