[Bug fortran/106121] ICE in gfc_simplify_extends_type_of, at fortran/simplify.cc:3109
gscfq@t-online.de
gcc-bugzilla@gcc.gnu.org
Tue Jun 28 17:05:51 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106121
G. Steinmetz <gscfq@t-online.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
--- Comment #1 from G. Steinmetz <gscfq@t-online.de> ---
$ cat z3.f90
program p
type t
integer :: a
end type
type(t) :: x
class(t) :: y
print *, extends_type_of(x, y)
end
$ cat z4.f90
program p
type t
integer :: a
end type
type(t) :: x
class(t) :: y
stop extends_type_of(x, y)
end
$ gfortran-13-20220626 -c z3.f90
z3.f90:6:16:
6 | class(t) :: y
| 1
Error: CLASS variable 'y' at (1) must be dummy, allocatable or pointer
$ gfortran-13-20220626 -c z4.f90
f951: internal compiler error: gfc_compare_derived_types: invalid derived type
0x73a249 gfc_report_diagnostic
../../gcc/fortran/error.cc:883
0x73bdc7 gfc_internal_error(char const*, ...)
../../gcc/fortran/error.cc:1503
0x748458 gfc_compare_derived_types(gfc_symbol*, gfc_symbol*)
../../gcc/fortran/interface.cc:619
0x7e032e gfc_type_is_extension_of(gfc_symbol*, gfc_symbol*)
../../gcc/fortran/symbol.cc:5116
0x7cfd01 gfc_simplify_extends_type_of(gfc_expr*, gfc_expr*)
../../gcc/fortran/simplify.cc:3109
0x750296 do_simplify
../../gcc/fortran/intrinsic.cc:4670
0x75b25a gfc_intrinsic_func_interface(gfc_expr*, int)
../../gcc/fortran/intrinsic.cc:5056
0x7b0068 resolve_unknown_f
../../gcc/fortran/resolve.cc:2990
0x7b0068 resolve_function
../../gcc/fortran/resolve.cc:3347
0x7b0068 gfc_resolve_expr(gfc_expr*)
../../gcc/fortran/resolve.cc:7187
0x740184 gfc_reduce_init_expr(gfc_expr*)
../../gcc/fortran/expr.cc:3163
0x76d538 gfc_match_stopcode
../../gcc/fortran/match.cc:3157
0x794051 match_word
../../gcc/fortran/parse.cc:67
0x7999ad decode_statement
../../gcc/fortran/parse.cc:561
0x799fca next_free
../../gcc/fortran/parse.cc:1397
0x799fca next_statement
../../gcc/fortran/parse.cc:1629
0x79b55b parse_spec
../../gcc/fortran/parse.cc:4168
0x79e6fc parse_progunit
../../gcc/fortran/parse.cc:6210
0x79fdc1 gfc_parse_file()
../../gcc/fortran/parse.cc:6755
0x7ee53f gfc_be_parse_file
../../gcc/fortran/f95-lang.cc:229
More information about the Gcc-bugs
mailing list