- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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**
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks - we'll check it out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I expect this to be fixed in update 1 of the 16.0 compiler.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page