]> git.ipfire.org Git - thirdparty/gcc.git/commit
backport: re PR fortran/60255 ([OOP] Deferred character length variable at (1) cannot...
authorAndre Vehreschild <vehre@gmx.de>
Mon, 23 Mar 2015 11:58:49 +0000 (12:58 +0100)
committerAndre Vehreschild <vehre@gcc.gnu.org>
Mon, 23 Mar 2015 11:58:49 +0000 (12:58 +0100)
commite376807f95b9a7a1624da26991c3a875f2b2a6f5
tree2dee7abc97ca86c3fd490d4be58b810c32e89027
parent09041b82b167cb0ccb2b10f7b28856af751b39f3
backport: re PR fortran/60255 ([OOP] Deferred character length variable at (1) cannot yet be associated with unlimited polymorphic entities)

gcc/fortran/ChangeLog

2015-03-23  Andre Vehreschild  <vehre@gmx.de>
    Janus Weil  <janus@gcc.gnu.org>

Backported from mainline
PR fortran/60255
Initial patch version: Janus Weil
* class.c (gfc_get_len_component): New.
(gfc_build_class_symbol): Add _len component to unlimited
polymorphic entities.
(find_intrinsic_vtab): Removed emitting of error message.
* gfortran.h: Added prototype for gfc_get_len_component.
* simplify.c (gfc_simplify_len): Use _len component where
available.
* trans-expr.c (gfc_class_len_get): New.
(gfc_conv_intrinsic_to_class): Add handling for deferred
character arrays.
(gfc_conv_structure): Treat _len component correctly.
(gfc_conv_expr): Prevent bind_c handling when not required.
(gfc_trans_pointer_assignment): Propagate _len component.
* trans-stmt.c (class_has_len_component): New.
(trans_associate_var): _len component treatement for associate
context.
(gfc_trans_allocate): Same as for trans_associate_var()
* trans.h: Add prototype for gfc_class_len_get.

gcc/testsuite/ChangeLog

2015-03-20  Andre Vehreschild  <vehre@gmx.de>

Backport from mainline
PR fortran/60255
* gfortran.dg/unlimited_polymorphic_2.f03: Removed error.
Converted from dos to unix line endings.
* gfortran.dg/unlimited_polymorphic_20.f03: New test.

Co-Authored-By: Janus Weil <janus@gcc.gnu.org>
From-SVN: r221591
gcc/fortran/ChangeLog
gcc/fortran/class.c
gcc/fortran/gfortran.h
gcc/fortran/simplify.c
gcc/fortran/trans-expr.c
gcc/fortran/trans-stmt.c
gcc/fortran/trans.h
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/unlimited_polymorphic_2.f03
gcc/testsuite/gfortran.dg/unlimited_polymorphic_20.f03 [new file with mode: 0644]