[Bug fortran/95068] New: [10/11 Regression] ICE in gfc_get_class_from_expr, at fortran/trans-expr.c:484
gscfq@t-online.de
gcc-bugzilla@gcc.gnu.org
Mon May 11 18:55:03 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95068
Bug ID: 95068
Summary: [10/11 Regression] ICE in gfc_get_class_from_expr, at
fortran/trans-expr.c:484
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Changed between 20190922 and 20190929 :
$ cat z1.f90
program p
type t
end type
contains
function f() result(x)
class(t), allocatable :: x
associate (y => (f))
end associate
end
end
$ gfortran-9 -c z1.f90 # no error
z1.f90:7:23:
7 | associate (y => (f))
| 1
Warning: Non-RECURSIVE procedure 'f' at (1) is possibly calling itself
recursively. Declare it RECURSIVE or use '-frecursive'
$ gfortran-11-20200510-chk -c z1.f90
z1.f90:7:23:
7 | associate (y => (f))
| 1
Warning: Non-RECURSIVE procedure 'f' at (1) is possibly calling itself
recursively. Declare it RECURSIVE or use '-frecursive'
z1.f90:7:0:
7 | associate (y => (f))
|
internal compiler error: tree check: expected class 'expression', have
'declaration' (function_decl) in tree_operand_check, at tree.h:3792
0x61669c tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
../../gcc/tree.c:9736
0x776349 expr_check(tree_node*, char const*, int, char const*)
../../gcc/tree.h:3463
0x776349 tree_operand_check(tree_node*, int, char const*, int, char const*)
../../gcc/tree.h:3792
0x776349 gfc_get_class_from_expr(tree_node*)
../../gcc/fortran/trans-expr.c:484
0x7d2502 trans_associate_var
../../gcc/fortran/trans-stmt.c:2100
0x7d8d99 gfc_trans_block_construct(gfc_code*)
../../gcc/fortran/trans-stmt.c:2283
0x73a207 trans_code
../../gcc/fortran/trans.c:1960
0x77194d gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:6835
0x77165c gfc_generate_contained_functions
../../gcc/fortran/trans-decl.c:5830
0x77165c gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:6767
0x6ea066 translate_all_program_units
../../gcc/fortran/parse.c:6306
0x6ea066 gfc_parse_file()
../../gcc/fortran/parse.c:6545
0x7364ff gfc_be_parse_file
../../gcc/fortran/f95-lang.c:210
More information about the Gcc-bugs
mailing list