[Patch, fortran] PR87566 - ICE with class(*) and select

Paul Richard Thomas paul.richard.thomas@gmail.com
Sun Oct 14 09:41:00 GMT 2018


Tobias started this patch and I finished it in answering a question
that he had about a problem with the gimplifier. Along the way, I
tried the associate version of the select type test case and found
that it failed in a different way. The chunk in resolve_assoc_var
fixes that.

Bootstrapped and regtested on FC28/x86_64 - OK for trunk?

On checking to see if any other associate problems had been fixed, I
noticed, as had Dominique, that PR83146 was fixed. I committed the
testcase to trunk as revision 265148 to make sure that it remained so.

Paul

2018-10-14  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-14  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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 6150 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20181014/d4efc5d3/attachment.bin>


More information about the Fortran mailing list