https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95587
Bug ID: 95587 Summary: ICE in gfc_target_encode_expr, at fortran/target-memory.c:362 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to at least r5 : $ cat z1.f90 program p class(*), allocatable :: x, y equivalence (x, y) end $ cat z2.f90 program p type t end type class(t), allocatable :: x, y equivalence (x, y) end $ cat z0.f90 # ok, allocatable object or pointer not allowed program p type t end type type(t), allocatable :: x, y equivalence (x, y) end $ gfortran-11-20200607 -c z1.f90 f951: internal compiler error: Invalid expression in gfc_target_encode_expr. 0x654af9 gfc_report_diagnostic ../../gcc/fortran/error.c:782 0x65621a gfc_internal_error(char const*, ...) ../../gcc/fortran/error.c:1402 0x6f3200 gfc_target_encode_expr(gfc_expr*, unsigned char*, unsigned long) ../../gcc/fortran/target-memory.c:362 0x6f32ff expr_to_char ../../gcc/fortran/target-memory.c:697 0x6f3dd0 gfc_merge_initializers(gfc_typespec, gfc_expr*, locus*, unsigned char*, unsigned char*, unsigned long) ../../gcc/fortran/target-memory.c:735 0x71cc63 get_init_field ../../gcc/fortran/trans-common.c:544 0x71cc63 create_common ../../gcc/fortran/trans-common.c:633 0x71e111 finish_equivalences ../../gcc/fortran/trans-common.c:1326 0x71e111 gfc_trans_common(gfc_namespace*) ../../gcc/fortran/trans-common.c:1363 0x72b60f gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6764 0x6b3126 translate_all_program_units ../../gcc/fortran/parse.c:6306 0x6b3126 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x6feb3f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212