https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96071
Bug ID: 96071 Summary: ICE in matching_typebound_op, at fortran/interface.c:4233 Product: gcc Version: unknown Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- gfortran-11.0.0 snapshot (g:cc9a9229285a26ac12bc8de53237ce9c4d42f867) ICEs when compiling the following testcase: module z5 type :: iu contains generic :: operator (+) => n1 end type iu contains subroutine p3 (hl, mp, id) class(iu) :: hl integer :: mp real :: id (hl + mp) end subroutine p3 end module z5 % powerpc-e300c3-linux-gnu-gfortran-11.0.0 -c rwmfukd0.f90 f951: internal compiler error: in matching_typebound_op, at fortran/interface.c:4233 0x599046 matching_typebound_op /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/interface.c:4233 0x87e754 gfc_extend_expr(gfc_expr*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/interface.c:4349 0x8e563b resolve_operator /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/resolve.c:4417 0x8e1f57 gfc_resolve_expr(gfc_expr*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/resolve.c:7047 0x8e1f57 gfc_resolve_expr(gfc_expr*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/resolve.c:7016 0x835bb2 resolve_array_bound /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/array.c:378 0x836950 gfc_resolve_array_spec(gfc_array_spec*, int) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/array.c:422 0x8e8307 gfc_resolve_formal_arglist(gfc_symbol*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/resolve.c:341 0x908182 do_traverse_symtree /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/symbol.c:4170 0x8e8b34 resolve_formal_arglists /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/resolve.c:563 0x8e8b34 resolve_contained_functions /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/resolve.c:1129 0x8e8b34 resolve_types /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/resolve.c:17180 0x8dc6fe gfc_resolve(gfc_namespace*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/resolve.c:17306 0x8dc6fe gfc_resolve(gfc_namespace*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/resolve.c:17287 0x8cdceb gfc_parse_file() /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/parse.c:6448 0x91df6e gfc_be_parse_file /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/f95-lang.c:212 (while my target here is powerpc, the ICE is not target-specific)