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

Integer overflow, ifort internal compiler error

zmi007
Beginner
677 Views

I am just playing with integer overflow in fortran compilers and have found that this simple "buggy" fortran code causes internal compiler error by ifort on each of the write instruction. Gfortran detects these overflows and shows some "Error: Arithmetic overflow" during compilation.

program    integer_overflow
implicit none
    write(*,*) -(-2147483647-1)
    write(*,*) 2000000000 + 2000000000
    write(*,*) -2147483647 - 2147483647
    write(*,*) 46341 * 46341
    write(*,*) (-2147483647-1) / -1
end program integer_overflow

With ifort (IFORT) 15.0.2 20150121

ifort intel_bug.f90 -o intel_bug.x
intel_bug.f90: catastrophic error: **Internal compiler error: floating point exception signal raised**

 

0 Kudos
3 Replies
Steven_L_Intel1
Employee
677 Views

Thanks - we'll check it out.

0 Kudos
Steven_L_Intel1
Employee
677 Views

Escalated as issue DPD200369228. It's only the last of the expressions that triggers the error, though I would have expected the compiler to complain about the other expressions that overflow.

0 Kudos
Steven_L_Intel1
Employee
677 Views

 I expect this to be fixed in update 1 of the 16.0 compiler.

0 Kudos
Reply