[Bug fortran/85685] New: [7/8/9 Regression] ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1598
gscfq@t-online.de
gcc-bugzilla@gcc.gnu.org
Mon May 7 17:38:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85685
Bug ID: 85685
Summary: [7/8/9 Regression] ICE in
gfc_deallocate_scalar_with_status, at
fortran/trans.c:1598
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Affects versions 7/8/9, if source contains an unused class variable.
Compiles without that line "... unused".
$ cat z1.f90
program p
type t
integer, pointer :: z
end type
class(t), allocatable :: unused
contains
subroutine s(x)
type(t) :: x[*]
if ( associated(x%z) ) deallocate(x%z)
end
end
$ gfortran-6 -c z1.f90 -fcoarray=lib
$
$ gfortran-9-20180506 -c z1.f90 -fcoarray=single
$ gfortran-9-20180506 -c z1.f90 -fcoarray=lib
z1.f90:9:0:
if ( associated(x%z) ) deallocate(x%z)
internal compiler error: in gfc_deallocate_scalar_with_status, at
fortran/trans.c:1598
0x74e610 gfc_deallocate_scalar_with_status(tree_node*, tree_node*, tree_node*,
bool, gfc_expr*, gfc_typespec, bool)
../../gcc/fortran/trans.c:1598
0x7bc806 gfc_trans_deallocate(gfc_code*)
../../gcc/fortran/trans-stmt.c:6943
0x74af27 trans_code
../../gcc/fortran/trans.c:2000
0x7b03f3 gfc_trans_if_1
../../gcc/fortran/trans-stmt.c:1433
0x7b81da gfc_trans_if(gfc_code*)
../../gcc/fortran/trans-stmt.c:1464
0x74b017 trans_code
../../gcc/fortran/trans.c:1916
0x772499 gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:6507
0x772317 gfc_generate_contained_functions
../../gcc/fortran/trans-decl.c:5519
0x772317 gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:6436
0x7015e0 translate_all_program_units
../../gcc/fortran/parse.c:6121
0x7015e0 gfc_parse_file()
../../gcc/fortran/parse.c:6324
0x74832f gfc_be_parse_file
../../gcc/fortran/f95-lang.c:204
More information about the Gcc-bugs
mailing list