https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97694
Bug ID: 97694 Summary: ICE with optional assumed rank class(*) argument Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: mscfd at gmx dot net Target Milestone: --- Created attachment 49494 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49494&action=edit Fortran source code The attached code crashs with an ICE. It requires that the argument has type class(*) and is optional. classstar_rank.f90:14:0: 14 | s = '0' | internal compiler error: Segmentation fault 0xbe205f crash_signal ../../gcc-repo/gcc/toplev.c:328 0x793007 trans_associate_var ../../gcc-repo/gcc/fortran/trans-stmt.c:1765 0x798fe1 gfc_trans_block_construct(gfc_code*) ../../gcc-repo/gcc/fortran/trans-stmt.c:2283 0x724950 trans_code ../../gcc-repo/gcc/fortran/trans.c:1960 0x79a89f gfc_trans_select_rank_cases ../../gcc-repo/gcc/fortran/trans-stmt.c:3703 0x79a89f gfc_trans_select_rank(gfc_code*) ../../gcc-repo/gcc/fortran/trans-stmt.c:3758 0x724aa3 trans_code ../../gcc-repo/gcc/fortran/trans.c:1984 0x798f70 gfc_trans_block_construct(gfc_code*) ../../gcc-repo/gcc/fortran/trans-stmt.c:2276 0x724950 trans_code ../../gcc-repo/gcc/fortran/trans.c:1960 0x791065 gfc_trans_if_1 ../../gcc-repo/gcc/fortran/trans-stmt.c:1448 0x798a8b gfc_trans_if(gfc_code*) ../../gcc-repo/gcc/fortran/trans-stmt.c:1480 0x724b23 trans_code ../../gcc-repo/gcc/fortran/trans.c:1952 0x74dd44 gfc_generate_function_code(gfc_namespace*) ../../gcc-repo/gcc/fortran/trans-decl.c:6835 0x728571 gfc_generate_module_code(gfc_namespace*) ../../gcc-repo/gcc/fortran/trans.c:2264 0x6ca905 translate_all_program_units ../../gcc-repo/gcc/fortran/parse.c:6293 0x6ca905 gfc_parse_file() ../../gcc-repo/gcc/fortran/parse.c:6545 0x721c4f gfc_be_parse_file ../../gcc-repo/gcc/fortran/f95-lang.c:210