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

Intrinsic MOD causes catastrophic error

tplaakso
Beginner
861 Views
Hi,

The following code;
[bash]program test
  real, dimension(:), allocatable :: a, b
  b = [1.0, 2.0, 3.0]
  a = mod(b, 2.0)
  print *, a
end program test
[/bash]
compiled using the latest compiler version in OSX, yields:
[bash]ifort -free -standard-semantics intel_mod_bug.f 
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 intel_mod_bug.f (code 1)
[/bash]
The problem being the intrinsic MOD (other intrinsics, e.g., SQRT do not produce the error above).

Works well using gfortran.

Teemu Laakso
0 Kudos
4 Replies
TimP
Honored Contributor III
861 Views
This appears to be a bug associated with -standard-semantics. I see the same problem with current ifort 12.1 64-bit on linux.
0 Kudos
tplaakso
Beginner
861 Views
Thank you for this reply. Is there a bug report already on this?

The catastrophic error can be obviously circumvented by doing the MOD assignment element-wise.

Teemu
0 Kudos
Steven_L_Intel1
Employee
861 Views
There is a bug report - the issue ID is DPD200176248. The particular option that is involved is -assume realloc_lhs.
0 Kudos
Steven_L_Intel1
Employee
861 Views
This has been fixed for a future release.
0 Kudos
Reply