Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Reporting a Catastrophic Error

sknobat
Beginner
882 Views
Hi
I was trying to compile the following code (developedbyJ F Harper, Mathematics, Victoria University, Wellington). I got the following messsage:
------ Build started: Project: Console1, Configuration: Debug|Win32 ------
Compiling with Intel Visual Fortran Compiler XE 12.1.4.325 [IA-32]...
testpure.f90
0_12459
: catastrophic error: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.
compilation aborted for C:\\Temp\\testpure.f90 (code 1)
Build log written to "file://C:\\Temp\\Console1\\Console1\\Debug\\BuildLog.htm"
Console1 - 1 error(s), 0 warning(s)
Code
! A Fortran 95 program that compiles and runs with some compilers, but
! others can't calculate lengths of both spf and dpf. The output should be
! "-1.000". If the line near the end that says
! real :: x = -1
! is changed to
! real(dp):: x = -1
! then the offending compilers can cope and give correct output.
!J F Harper, Mathematics, Victoria University, Wellington,NZ
!
module findbug
implicit none
integer,parameter:: dp=kind(1d0)
interface f
module procedure dpf,spf
end interface f
contains
pure function findf( x) result (out)! with length 50
real(dp),intent(in)::x
character(len = 50):: out
write(out,"(F0.3)") x
end function findf
pure function dpf( x) ! trimmed
real(dp),intent(in)::x
character:: dpf*(len_trim(findf(x)))
dpf = trim(findf(real(x,dp)))
end function dpf
pure function spf( x) ! trimmed
real,intent(in)::x
character:: spf*(len_trim(dpf(real(x,dp))))
spf = trim(dpf(real(x,dp)))
end function spf
end module findbug
program tryf
use findbug, only: dp,f
implicit none
real :: x = -1
print *,'"'//f(x)//'"'
end program tryf
Thank you
Sam
0 Kudos
5 Replies
TimP
Honored Contributor III
882 Views
This is definitely a bug of Intel compilers; I reproduced this with a 6 week old ifort for intel64.
The workaround is as stated by the author.
0 Kudos
Steven_L_Intel1
Employee
882 Views
I can also reproduce this. The program looks familiar - it may have been reported before. I will check.

Yep - this is our issue DPD200175919 which has not yet been fixed. Pretty much identical program source.
0 Kudos
mecej4
Honored Contributor III
882 Views
I note that the program performs recursive I/O (not to the same "unit", but once to an internal file and then to standard output).
0 Kudos
Steven_L_Intel1
Employee
882 Views
That's allowed.
0 Kudos
Steven_L_Intel1
Employee
882 Views

This problem was fixed in the 16.0 compiler. It was particularly difficult to solve.

0 Kudos
Reply