re PR fortran/87566 (ICE with class(*) and select)
authorPaul Thomas <pault@gcc.gnu.org>
Mon, 15 Oct 2018 16:31:15 +0000 (16:31 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Mon, 15 Oct 2018 16:31:15 +0000 (16:31 +0000)
commite60f68ec460bc5b33a6f75caac9667bf978f37d8
tree3cdf05c071e53c16a1aa96b96c259221366c7d1e
parent72551c683ce3ae89835216851473863c6d4ef27f
re PR fortran/87566 (ICE with class(*) and select)

2018-10-15  Paul Thomas  <pault@gcc.gnu.org>
    Tobias Burnus  <burnus@gcc.gnu.org>

PR fortran/87566
* resolve.c (resolve_assoc_var): Add missing array spec for
class associate names.
(resolve_select_type): Handle case where last typed component
of the selector has a different type to the expression.
* trans-expr.c (gfc_find_and_cut_at_last_class_ref): Replace
call to gfc_expr_to_initialize with call to gfc_copy_expr.
(gfc_conv_class_to_class): Guard assignment to 'len' field
against case where zero constant is supplied.

2018-10-15  Paul Thomas  <pault@gcc.gnu.org>
    Tobias Burnus  <burnus@gcc.gnu.org>

PR fortran/87566
* gfortran.dg/select_type_44.f90: New test.
* gfortran.dg/associate_42.f90: New test.

Co-Authored-By: Tobias Burnus <burnus@gcc.gnu.org>
From-SVN: r265171
gcc/fortran/ChangeLog
gcc/fortran/resolve.c
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/associate_42.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/select_type_44.f90 [new file with mode: 0644]