- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The code below works fine when compiled by IFC 8.1 but works wrong when compiled by IFC 9.0
I'd be grateful if anybody would explain is it a compiler bug(!?) or I need to specify some option in the new compiler version, etc.
Normally, I expect two similar pairs of numbers on the screen, if the sub-array is transferred correctly between the modules.
c*******************************************************
program pbug
implicit none
external :: sbug
integer*4 :: i, j
real*8, dimension(1:5, 1:5) :: b
forall (i = 1:5, j = 1:5) b(i, j) = dble(i + j)
write (6, *) b(2, 4)
write (6, *) b(3, 4)
write (6, *)
i = 3
j = 4
write (6, *) b(2, 4)
write (6, *) b(3, 4)
write (6, *)
i = 3
j = 4
call sbug(b((i - 1):i, j))
stop
end
end
c*******************************************************
subroutine sbug(p)
implicit none
real*8, dimension(1:2), intent(in) :: p
write (6, *) p(1)
write (6, *) p(2)
write (6, *) p(2)
return
end
end
c*******************************************************
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm guessing that you don't have the latest update to 9.0, 9.0-21. There was a bug in some earlier versions of the nature you encountered, but it is fixed in 9.0-021 (I just tried your example.)

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