[Bug fortran/88229] New: ICE tree check: expected integer_cst, have nop_expr in get_len, at tree.h:5608
gscfq@t-online.de
gcc-bugzilla@gcc.gnu.org
Tue Nov 27 17:59:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88229
Bug ID: 88229
Summary: ICE tree check: expected integer_cst, have nop_expr in
get_len, at tree.h:5608
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: ---
With valid code at -O[s123] :
$ cat z1.f90
program p
call s
contains
subroutine s
character(:), allocatable :: y
allocate (y, source=f('abcdefffffffffff'))
end
function f(x) result(z)
character(*) :: x
character(:), allocatable :: z
allocate (z, source=(x))
end
end
$ cat z2.f90
program p
call s
contains
subroutine s
character(:,kind=4), allocatable :: y
allocate (y, source=f(4_'abcd'))
end
function f(x) result(z)
character(*,kind=4) :: x
character(:,kind=4), allocatable :: z
allocate (z, source=(x))
end
end
$ gfortran-9-20181125 -c z1.f90 -O0
z1.f90:11:0:
11 | allocate (z, source=(x))
|
Error: size of variable 'source.0' is too large
$ gfortran-9-20181125 -c z1.f90 -O2
during GIMPLE pass: ccp
z1.f90:1:0:
1 | program p
|
internal compiler error: tree check: expected integer_cst, have nop_expr in
get_len, at tree.h:5608
0x5e466a tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/tree.c:9745
0xec8c34 tree_check(tree_node const*, char const*, int, char const*, tree_code)
../../gcc/tree.h:3410
0xec8c34 wi::extended_tree<128>::get_len() const
../../gcc/tree.h:5608
0xec8c34 wi::int_traits<generic_wide_int<wi::extended_tree<128> >
>::decompose(long*, unsigned int, generic_wide_int<wi::extended_tree<128> >
const&)
../../gcc/wide-int.h:964
0xec8c34 wide_int_ref_storage<true,
false>::wide_int_ref_storage<generic_wide_int<wi::extended_tree<128> >
>(generic_wide_int<wi::extended_tree<128> > const&, unsigned int)
../../gcc/wide-int.h:1013
0xec8c34 generic_wide_int<wide_int_ref_storage<true, false>
>::generic_wide_int<generic_wide_int<wi::extended_tree<128> >
>(generic_wide_int<wi::extended_tree<128> > const&, unsigned int)
../../gcc/wide-int.h:788
0xec8c34 bool wi::eq_p<generic_wide_int<wi::extended_tree<128> >,
int>(generic_wide_int<wi::extended_tree<128> > const&, int const&)
../../gcc/wide-int.h:1832
0xec424a bool wi::ne_p<generic_wide_int<wi::extended_tree<128> >,
int>(generic_wide_int<wi::extended_tree<128> > const&, int const&)
../../gcc/wide-int.h:1870
0xec424a wi::binary_traits<generic_wide_int<wi::extended_tree<128> >, int,
wi::int_traits<generic_wide_int<wi::extended_tree<128> > >::precision_type,
wi::int_traits<int>::precision_type>::predicate_result
operator!=<generic_wide_int<wi::extended_tree<128> >,
int>(generic_wide_int<wi::extended_tree<128> > const&, int const&)
../../gcc/wide-int.h:3269
0xec424a if_nonpoly<int, bool, poly_int_traits<int>::is_poly>::type
maybe_ne<1u, generic_wide_int<wi::extended_tree<128> >, int>(poly_int_pod<1u,
generic_wide_int<wi::extended_tree<128> > > const&, int const&)
../../gcc/poly-int.h:1282
0xec424a bool known_size_p<poly_int<1u, generic_wide_int<wi::extended_tree<128>
> > >(poly_int<1u, generic_wide_int<wi::extended_tree<128> > > const&)
../../gcc/poly-int.h:2487
0xec424a bool known_subrange_p<poly_int<1u,
generic_wide_int<fixed_wide_int_storage<128> > >, poly_int<1u,
generic_wide_int<wi::extended_tree<128> > >, int, poly_int<1u,
generic_wide_int<wi::extended_tree<128> > > >(poly_int<1u,
generic_wide_int<fixed_wide_int_storage<128> > > const&, poly_int<1u,
generic_wide_int<wi::extended_tree<128> > > const&, int const&, poly_int<1u,
generic_wide_int<wi::extended_tree<128> > > const&)
../../gcc/poly-int.h:2595
0xec424a non_rewritable_mem_ref_base
../../gcc/tree-ssa.c:1450
0xec4b1d execute_update_addresses_taken()
../../gcc/tree-ssa.c:1697
0xba6078 execute_function_todo
../../gcc/passes.c:1952
0xba6fe2 execute_todo
../../gcc/passes.c:2031
$ gfortran-9-20181125 -c z2.f90 -O2
during GIMPLE pass: ccp
z2.f90:1:0:
1 | program p
|
internal compiler error: tree check: expected integer_cst, have mult_expr in
get_len, at tree.h:5608
0x5e466a tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/tree.c:9745
#...
More information about the Gcc-bugs
mailing list