https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98342

--- Comment #4 from martin <mscfd at gmx dot net> ---
Just checked the patch and it works great, except that I can now easily produce
an ICE by changing (in sel_rank)

   type(tuple), dimension(..), intent(in) :: x

to

   class(*), dimension(..), intent(in) :: x

The ICE is
fc_get_descriptor_field, at fortran/trans-array.c:140
0x613e94 gfc_get_descriptor_field
        ../../gcc-repo/gcc/fortran/trans-array.c:140
0x75cd35 gfc_conv_descriptor_data_get(tree_node*)
        ../../gcc-repo/gcc/fortran/trans-array.c:159
0x76b769 gfc_conv_array_data(tree_node*)
        ../../gcc-repo/gcc/fortran/trans-array.c:2985
0x76b769 structure_alloc_comps
        ../../gcc-repo/gcc/fortran/trans-array.c:8559
0x76d9ca gfc_deallocate_alloc_comp(gfc_symbol*, tree_node*, int, int)
        ../../gcc-repo/gcc/fortran/trans-array.c:9681
0x797535 gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*,
gfc_expr*, vec<tree_node*, va_gc, vl_embed>*)
        ../../gcc-repo/gcc/fortran/trans-expr.c:6457
0x79088b gfc_trans_assignment_1
        ../../gcc-repo/gcc/fortran/trans-expr.c:10930
0x757f33 trans_code
        ../../gcc-repo/gcc/fortran/trans.c:1888
0x781504 gfc_generate_function_code(gfc_namespace*)
        ../../gcc-repo/gcc/fortran/trans-decl.c:6880
0x6fd5ce translate_all_program_units
        ../../gcc-repo/gcc/fortran/parse.c:6351
0x6fd5ce gfc_parse_file()
        ../../gcc-repo/gcc/fortran/parse.c:6620
0x75503f gfc_be_parse_file
        ../../gcc-repo/gcc/fortran/f95-lang.c:212


Not sure whether this is an entirely new problem or related to the patch. At
least trans-expr.c6457 is just about 20 lines below the place where the patch
add the lines.

Reply via email to