re PR fortran/70397 (ice while allocating ultimate polymorphic)
authorAndre Vehreschild <vehre@gcc.gnu.org>
Tue, 29 Mar 2016 16:54:24 +0000 (18:54 +0200)
committerAndre Vehreschild <vehre@gcc.gnu.org>
Tue, 29 Mar 2016 16:54:24 +0000 (18:54 +0200)
commit728557fda26f7ffa540bb2e614e4debae366d2ad
treee4e0a9b1cd9f9d0b25895fe00681f2f8dc699f04
parentda178d566a0731534f369273fa9480e1210cb01c
re PR fortran/70397 (ice while allocating ultimate polymorphic)

gcc/fortran/ChangeLog:

2016-03-29  Andre Vehreschild  <vehre@gcc.gnu.org>

PR fortran/70397
* trans-expr.c (gfc_class_len_or_zero_get): Add function to return a
constant zero tree, when the class to get the _len component from is
not unlimited polymorphic.
(gfc_copy_class_to_class): Use the new function.
* trans.h: Added interface of new function gfc_class_len_or_zero_get.

gcc/testsuite/ChangeLog:

2016-03-29  Andre Vehreschild  <vehre@gcc.gnu.org>

PR fortran/70397
* gfortran.dg/unlimited_polymorphic_25.f90: New test.
* gfortran.dg/unlimited_polymorphic_26.f90: New test.

From-SVN: r234528
gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c
gcc/fortran/trans.h
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/unlimited_polymorphic_25.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/unlimited_polymorphic_26.f90 [new file with mode: 0644]