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

ifort bug

machida
Beginner
779 Views
I found that the output depends on optimization options if I compile the following code by ifort.

implicit none
integer i,j,k
do j=1,2
do i=1,2
write (*,*) j
do k=1,2
enddo
enddo
enddo
end

Obviously the correct output is "1 1 2 2". With the default option (-O2), however, the output "2 2 2 2" is obtained. Other options (-O1 or -O0) give the correct result.

The code was run on Itanium 2. The above-mentioned error occurs with ifort 9.1 or higher, though the code runs correctly with ifort 8.1.
0 Kudos
3 Replies
Steven_L_Intel1
Employee
779 Views
This sounds vaguely familiar. Have you tried it with 10.1? If it still does this for you with 10.1, please report it to Intel Premier Support.
0 Kudos
Ron_Green
Moderator
779 Views
Looks like it's in 10.1.006. Please file a bug report at http://premier.intel.com.

Only affects IA64

ron
0 Kudos
Ron_Green
Moderator
779 Views
correction: the bug is in 10.1.008, the latest IA64 compiler. File a bug report please.

ron
0 Kudos
Reply