[Bug fortran/99257] New: ICE in build_field, at fortran/trans-common.c:303
gscfq@t-online.de
gcc-bugzilla@gcc.gnu.org
Wed Feb 24 17:32:25 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99257
Bug ID: 99257
Summary: ICE in build_field, at fortran/trans-common.c:303
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: ---
Presumably valid code, affects versions down to at least r5.
In module m2 variable a is visible, b and c are not.
$ cat z1.f90
module m
integer :: a = 1
integer :: b = 2
integer :: c
equivalence (b, c)
end
module m2
use m, only : a
contains
subroutine b
end
end
$ cat z2.f90
module m
private
integer, public :: a = 1
integer :: b = 2
integer :: c
equivalence (b, c)
end
module m2
use m
contains
subroutine b
end
end
$ gfortran-11-20210221 -c z1.f90
f951: internal compiler error: Segmentation fault
0xda031f crash_signal
../../gcc/toplev.c:327
0xa1b95b contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
../../gcc/tree.h:3462
0xa1b95b size_binop_loc(unsigned int, tree_code, tree_node*, tree_node*)
../../gcc/fold-const.c:1900
0x793cea build_field
../../gcc/fortran/trans-common.c:303
0x793cea create_common
../../gcc/fortran/trans-common.c:669
0x796387 finish_equivalences
../../gcc/fortran/trans-common.c:1349
0x796387 gfc_trans_common(gfc_namespace*)
../../gcc/fortran/trans-common.c:1386
0x7a92d7 gfc_generate_module_vars(gfc_namespace*)
../../gcc/fortran/trans-decl.c:5835
0x776bf1 gfc_generate_module_code(gfc_namespace*)
../../gcc/fortran/trans.c:2296
0x720821 translate_all_program_units
../../gcc/fortran/parse.c:6338
0x720821 gfc_parse_file()
../../gcc/fortran/parse.c:6620
0x76dbcf gfc_be_parse_file
../../gcc/fortran/f95-lang.c:212
More information about the Gcc-bugs
mailing list