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

compatibility problem CVF <--> IVF

vriesdwj
Beginner
449 Views
Hi,
Untill last week we used CVF, but now we try to port our applications to IVF.
We are having problems with the next piece of code.
In CVF it runs and says at the end itra=1.
In IVF it crashes because i(0) is going to be evaluated in the WHILE statement.
Is there an option in the IVF compiler to handle this problem.
This kind of syntax is often used in our code, so I don't want to rewrite it.
Thanks in advance,
Wilco de Vries

program test
implicit none
integer itra
real*4 i(4)
itra = 4
i=4
! Original code
DO WHILE (itra.GT.1 .AND. 3 .LE. i(itra-1))
itra = itra - 1
ENDDO
write(6,*) itra
end program test
0 Kudos
1 Reply
Steven_L_Intel1
Employee
449 Views
This is an error in your code which you will have to fix. Read this article, which I wrote while working on CVF. As you'll see, CVF could behave this way too for many applications.
0 Kudos
Reply