[Bug fortran/93791] New: [9/10 Regression] ICE in can_represent_integral_type_p, at real.c:5426
gscfq@t-online.de
gcc-bugzilla@gcc.gnu.org
Mon Feb 17 18:53:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93791
Bug ID: 93791
Summary: [9/10 Regression] ICE in
can_represent_integral_type_p, at real.c:5426
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Changed between 20181007 and 20181014, at -O1+ :
$ cat z1.f90
program p
implicit none
if ( f(1.0) > 0.0 ) stop
contains
real function f(x)
real, intent(in) :: x
f = g !()
end
real function g()
g = 2.0
end
end
$ cat z2.f90
program p
implicit none
if ( f() > 0.0 ) stop
contains
real function f(x)
real, optional :: x
f = g !()
end
real function g()
g = 2.0
end
end
$ cat z3.f90
program p
implicit none
call s
contains
subroutine s
real :: x
x = g !()
if ( x > 0.0 ) stop
end
real function g()
g = 2.0
end
end
$ gfortran-8 -c z1.f90 -O2
$
$ gfortran-10-20200216 -c z1.f90 -O2
during GIMPLE pass: forwprop
z1.f90:3:0:
3 | if ( f(1.0) > 0.0 ) stop
|
internal compiler error: in can_represent_integral_type_p, at real.c:5422
0xb21e3f format_helper::can_represent_integral_type_p(tree_node*) const
../../gcc/real.c:5422
0xf9a48c gimple_simplify_161
.../gcc/gimple-match.c:9568
0xfb10d8 gimple_simplify_GT_EXPR
.../gcc/gimple-match.c:78553
0x100250d gimple_simplify
.../gcc/gimple-match.c:110777
0x1003f6b gimple_resimplify2
../../gcc/gimple-match-head.c:318
0x1022644 gimple_simplify(gimple*, gimple_match_op*, gimple**, tree_node*
(*)(tree_node*), tree_node* (*)(tree_node*))
../../gcc/gimple-match-head.c:1081
0x92b049 fold_stmt_1
../../gcc/gimple-fold.c:5075
0xca5f5e execute
../../gcc/tree-ssa-forwprop.c:3025
Side note : detected with reversed order, i.e. define g first.
More information about the Gcc-bugs
mailing list