[Bug fortran/72770] New: ICE in make_ssa_name_fn, at tree-ssanames.c:263
gerhard.steinmetz.fortran@t-online.de
gcc-bugzilla@gcc.gnu.org
Mon Aug 1 18:32:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72770
Bug ID: 72770
Summary: ICE in make_ssa_name_fn, at tree-ssanames.c:263
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gerhard.steinmetz.fortran@t-online.de
Target Milestone: ---
ICE with valid examples and experimental (--enable-checking=yes)
version 7 from 20160731 at -Os, -O1 or higher.
$ cat z1.f90
program p
type t
class(*), allocatable :: q(:)
end type
type(t) :: z
integer :: a(3) = [1, 2, 3]
character(2) :: c(3) = ['ab', 'ef', 'ih']
allocate (z%q(3), source=a)
call s
contains
subroutine s
select type (x => z%q)
type is (integer)
if ( any(x/=a) ) call abort
type is (character(len=*))
if ( any(x/=c) ) call abort
end select
end
end
$ cat z2.f90
program p
type t
class(*), allocatable :: q(:)
end type
type(t) :: z
integer :: a(3) = [1, 2, 3]
character(2) :: c(3) = ['ab', 'ef', 'ih']
allocate (z%q(3), source=c)
call s
contains
subroutine s
select type (x => z%q)
type is (integer)
if ( any(x/=a) ) call abort
type is (character(len=*))
if ( any(x/=c) ) call abort
end select
end
end
$ gfortran-7-20160731 -O2 z1.f90
z1.f90:9:0:
call s
internal compiler error: Segmentation fault
0xc1436f crash_signal
../../gcc/toplev.c:335
0xe1fe21 make_ssa_name_fn(function*, tree_node*, gimple*)
../../gcc/tree-ssanames.c:263
0xc8a3ac make_ssa_name
../../gcc/tree-ssanames.h:111
0xc8a3ac remap_ssa_name
../../gcc/tree-inline.c:238
0xc90afc copy_tree_body_r(tree_node**, int*, void*)
../../gcc/tree-inline.c:1083
0xec5c12 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, default_hash_traits<tree_node*> >*, tree_node*
(*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*,
hash_set<tree_node*, default_hash_traits<tree_node*> >*))
../../gcc/tree.c:11646
0xec6066 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, default_hash_traits<tree_node*> >*, tree_node*
(*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*,
hash_set<tree_node*, default_hash_traits<tree_node*> >*))
../../gcc/tree.c:11962
0xc89218 remap_type_1
../../gcc/tree-inline.c:562
0xc899a1 remap_type(tree_node*, copy_body_data*)
../../gcc/tree-inline.c:591
0xc88974 remap_type_1
../../gcc/tree-inline.c:416
0xc899a1 remap_type(tree_node*, copy_body_data*)
../../gcc/tree-inline.c:591
0xc913f8 remap_gimple_op_r
../../gcc/tree-inline.c:994
0xec5c12 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, default_hash_traits<tree_node*> >*, tree_node*
(*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*,
hash_set<tree_node*, default_hash_traits<tree_node*> >*))
../../gcc/tree.c:11646
0x99e440 walk_gimple_op(gimple*, tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
../../gcc/gimple-walk.c:203
0xc8b2dc remap_gimple_stmt
../../gcc/tree-inline.c:1733
0xc8c4ce copy_bb
../../gcc/tree-inline.c:1791
0xc8d958 copy_cfg_body
../../gcc/tree-inline.c:2736
0xc8d958 copy_body
../../gcc/tree-inline.c:2976
0xc93e21 expand_call_inline
../../gcc/tree-inline.c:4717
0xc95154 gimple_expand_calls_inline
../../gcc/tree-inline.c:4862
More information about the Gcc-bugs
mailing list