- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
given the following code:
program test
Implicit NONE
INTEGER,parameter:: n=130,nt=n-80
REAL*8 :: x
INTEGER :: i
x=0.0d0
DO i=1,n
x=x+0.1
IF(i .ge. 120)THEN
write(*,*)i,x
pause
ELSE
ENDIF
IF(i.ge.nt)write(*,*)i,x
ENDDO
END Program test
I would not expect to have the following output:
...
118 11.8000001758337
119 11.9000001773238
50 12.0000001788139
FORTRAN PAUSE
119 11.9000001773238
50 12.0000001788139
FORTRAN PAUSE
Apparently the value of index i is changing somehow. This is a part of one of my codes I just removed what I could to find the problem, but now I'm left with this and I don't get it. Any other compiler (gcc, or older version of intel) works properly, but the version ifort version 18.0.1 does not.
Any ideia?
Thanks
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes - I can see this behavior when optimizing. Looks like a compiler bug. Please report it to the Intel Online Service Center.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok thank you.
I believe this post can be deleted.
All the Best.
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