https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83189
Bug ID: 83189
Summary: [8 regression] internal compiler error: in
probability_in, at profile-count.h:1050
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: skpgkp1 at gmail dot com
Target Milestone: ---
This issue appear in GCC 8 espresso build. GCC 7 works fine. Following are
steps to reproduce.
$cat radin_mod.f90
Module radin_mod
INTEGER, PARAMETER :: DP = selected_real_kind(14,200)
Contains
Subroutine SPLIFT (X,Y,YP,YPP,N,IERR,ISX,A1,B1,AN,BN)
Integer, Intent(in) :: N,ISX
Real(dp), Intent(in) :: X(N),Y(N),A1,B1,AN,BN
Real(dp), Intent(out) :: YP(N),YPP(N)
Real(dp), Allocatable, Dimension(:,:) :: W
NM1 = N-1
NM2 = N-2
If (ISX.Gt.0) GO TO 40
Do I=2,N
If (X(I)-X(I-1) .Le. 0) Then
IERR = 3
Return
Endif
End Do
Allocate(W(N,3))
40 YPP(1) = 4*B1
DOLD = (Y(2)-Y(1))/W(2,2)
Do I=2,NM2
DNEW = (Y(I+1) - Y(I))/W(I+1,2)
YPP(I) = 6*(DNEW - DOLD)
YP(I) = DOLD
DOLD = DNEW
End Do
Return
End Subroutine SPLIFT
End Module radin_mod
$gfortran --version
GNU Fortran (GCC) 8.0.0 20171127 (experimental)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$gfortran -O3 -x f95-cpp-input -c radin_mod.f90
during GIMPLE pass: pcom
radin_mod.f90:4:0:
Subroutine SPLIFT (X,Y,YP,YPP,N,IERR,ISX,A1,B1,AN,BN)
internal compiler error: in probability_in, at profile-count.h:1050
0x6ed972 profile_count::probability_in(profile_count) const
../../gcc-main.3O1J/gcc/profile-count.h:1050
0x6ed972 tree_transform_and_unroll_loop(loop*, unsigned int, edge_def*,
tree_niter_desc*, void (*)(loop*, void*), void*)
../../gcc-main.3O1J/gcc/tree-ssa-loop-manip.c:1382
0xe16b26 tree_predictive_commoning_loop
../../gcc-main.3O1J/gcc/tree-predcom.c:3274
0xe182b0 tree_predictive_commoning()
../../gcc-main.3O1J/gcc/tree-predcom.c:3308
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
### Work fine with GCC 7
$gfortran --version
GNU Fortran (GCC) 7.2.1 20171127
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$gfortran -O3 -x f95-cpp-input -c radin_mod.f90
$echo $?
0