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

            Bug ID: 88304
           Summary: [9 Regression] ICE in use_pointer_in_frame, at
                    tree-nested.c:267
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anlauf at gmx dot de
  Target Milestone: ---

Created attachment 45136
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45136&action=edit
Reproducer

Current 9-trunk crashes for me on the attached code with the following:

gfcbug152.f90:33:0:

   33 |   subroutine convert_cof ()
      | 
internal compiler error: tree check: expected tree that contains 'decl common'
structure, have 'component_ref' in use_pointer_in_frame, at tree-nested.c:267
0x5ed50f tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
        ../../trunk/gcc/tree.c:9929
0xd43bc0 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        ../../trunk/gcc/tree.h:3268
0xd43bc0 use_pointer_in_frame
        ../../trunk/gcc/tree-nested.c:267
0xd4a035 convert_local_reference_stmt
        ../../trunk/gcc/tree-nested.c:2312
0x9d8b66 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
        ../../trunk/gcc/gimple-walk.c:568
0x9d8d80 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        ../../trunk/gcc/gimple-walk.c:51
0x9d8cc1 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
        ../../trunk/gcc/gimple-walk.c:631
0x9d8d80 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        ../../trunk/gcc/gimple-walk.c:51
0x9d8c21 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
        ../../trunk/gcc/gimple-walk.c:595
0x9d8d80 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        ../../trunk/gcc/gimple-walk.c:51
0x9d8c21 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
        ../../trunk/gcc/gimple-walk.c:595
0x9d8d80 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        ../../trunk/gcc/gimple-walk.c:51
0xd43a38 walk_body
        ../../trunk/gcc/tree-nested.c:703
0xd43a88 walk_function
        ../../trunk/gcc/tree-nested.c:714
0xd43a88 walk_all_functions
        ../../trunk/gcc/tree-nested.c:779
0xd4d8c4 lower_nested_functions(tree_node*)
        ../../trunk/gcc/tree-nested.c:3467
0x8364b0 cgraph_node::analyze()
        ../../trunk/gcc/cgraphunit.c:673
0x839939 analyze_functions
        ../../trunk/gcc/cgraphunit.c:1126
0x83aa22 symbol_table::finalize_compilation_unit()
        ../../trunk/gcc/cgraphunit.c:2835
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

% gfc-trunk --version
GNU Fortran (GCC) 9.0.0 20181202 (experimental)


Reprocing required netcdf-4.6 with netcdf-fortran-4.4.4 installed.

I will try to reduce the netcdf-fortran module files.

Reply via email to