[Bug fortran/92781] New: ICE in convert_nonlocal_reference_op, at tree-nested.c:1065

gscfq@t-online.de gcc-bugzilla@gcc.gnu.org
Tue Dec 3 21:06:00 GMT 2019


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

            Bug ID: 92781
           Summary: ICE in convert_nonlocal_reference_op, at
                    tree-nested.c:1065
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

This affects versions down to at least gfortran-4.9;
Starting with a legal source ...


$ cat z0.f90
function f()
   character(:), allocatable :: f
   f = 'abc'
end

$ gfortran-10-20191201 -c z0.f90
$


... then adding a local procedure (here unused and empty) :

$ cat z1.f90
function f()
   character(:), allocatable :: f
   f = 'abc'
contains
   subroutine s
   end
end


$ gfortran-10-20191201 -c z1.f90
z1.f90:1:0:

    1 | function f()
      |
internal compiler error: Segmentation fault
0xd0039f crash_signal
        ../../gcc/toplev.c:328
0xdbed18 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        ../../gcc/tree.h:3386
0xdbed18 convert_nonlocal_reference_op
        ../../gcc/tree-nested.c:1065
0x1028493 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*))
        ../../gcc/tree.c:11957
0x9fc177 walk_gimple_op(gimple*, tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        ../../gcc/gimple-walk.c:221
0x9fc558 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
        ../../gcc/gimple-walk.c:596
0x9fc740 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        ../../gcc/gimple-walk.c:51
0x9fc681 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
        ../../gcc/gimple-walk.c:641
0x9fc740 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        ../../gcc/gimple-walk.c:51
0x9fc5e1 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
        ../../gcc/gimple-walk.c:605
0x9fc740 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        ../../gcc/gimple-walk.c:51
0xdb7df8 walk_body
        ../../gcc/tree-nested.c:713
0xdb7e48 walk_function
        ../../gcc/tree-nested.c:724
0xdb7e48 walk_all_functions
        ../../gcc/tree-nested.c:789
0xdc174f lower_nested_functions(tree_node*)
        ../../gcc/tree-nested.c:3528
0x84ed00 cgraph_node::analyze()
        ../../gcc/cgraphunit.c:675
0x8521f5 analyze_functions
        ../../gcc/cgraphunit.c:1212
0x853572 symbol_table::finalize_compilation_unit()
        ../../gcc/cgraphunit.c:2925


More information about the Gcc-bugs mailing list