- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have some trouble with Intels Fortran-Compiler
ifort Version 9.0 on our Linux/Itanium platform.
Below you will find a short test program and a
test data file to demonstrate the problem.
program test
do i = 1, 1
open(unit=11,file='test.dat',status='old')
nComp = 0
do
if(nComp == 4) exit
nComp = nComp + 1
enddo
do
read(11,'(A)',end=900)
write(*,*) 'before do', nComp
do j = 1, nComp
write(*,*) ' after do', nComp
enddo
enddo
900 continue
close(11)
enddo
end
test.dat
--------
line 1
line 2
line 3
If I compile and run the program using
ifort test.f
./a.out
I get the wrong output:
before do 4
before do 4
after do 1
before do 4
after do 2
after do 2
Please note, that "before do" and "after do" differs in the
value.
If I compile and run the program without optimization using
ifort -g test.f
./a.out
I get the correct output:
before do 4
after do 4
after do 4
after do 4
after do 4
before do 4
after do 4
after do 4
after do 4
after do 4
before do 4
after do 4
after do 4
after do 4
after do 4
Does someone knows the reason of the difference?
Thanks,
Dieter
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
seems to be the same bug as soyrush posted on17.2.
This was reported to Premier Support.
Hans
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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