https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99818
Bug ID: 99818
Summary: [10/11 Regression] ICE in gfc_get_tree_for_caf_expr,
at fortran/trans-expr.c:2186
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
Changed between 20210207 and 20210214 :
$ cat z1.f90
module m
type t
integer :: a
contains
procedure :: s
end type
contains
subroutine s(x)
class(t) :: x[*]
end
end
program p
use m
associate (y => t(1))
call y%s
end associate
end
$ gfortran-11-20210207 -c z1.f90 -fcoarray=single
z1.f90:15:12:
15 | call y%s
| 1
Error: VARIABLE attribute of 'y' conflicts with PROCEDURE attribute at (1)
$ gfortran-11-20210207 -c z1.f90 -fcoarray=lib
z1.f90:15:12:
15 | call y%s
| 1
Error: VARIABLE attribute of 'y' conflicts with PROCEDURE attribute at (1)
$ gfortran-11-20210328 -c z1.f90 -fcoarray=single
$
$ gfortran-11-20210328 -c z1.f90 -fcoarray=lib
z1.f90:15:14:
15 | call y%s
| 1
internal compiler error: in gfc_get_tree_for_caf_expr, at
fortran/trans-expr.c:2186
0x76304b gfc_get_tree_for_caf_expr(gfc_expr*)
../../gcc/fortran/trans-expr.c:2186
0x76fb7b gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*,
gfc_expr*, vec<tree_node*, va_gc, vl_embed>*)
../../gcc/fortran/trans-expr.c:6837
0x7a8d28 gfc_trans_call(gfc_code*, bool, tree_node*, tree_node*, bool)
../../gcc/fortran/trans-stmt.c:424
0x7391a8 trans_code
../../gcc/fortran/trans.c:1990
0x7ad12f gfc_trans_block_construct(gfc_code*)
../../gcc/fortran/trans-stmt.c:2304
0x738f67 trans_code
../../gcc/fortran/trans.c:2018
0x75f5e4 gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:6884
0x6e5de6 translate_all_program_units
../../gcc/fortran/parse.c:6351
0x6e5de6 gfc_parse_file()
../../gcc/fortran/parse.c:6620
0x7320ef gfc_be_parse_file
../../gcc/fortran/f95-lang.c:212