Hi All,
In a product that has always appeared to work fine up till now I have some code a bit like this:
integer :: a(10,10,10,10), b(10)
do i = 1,10
a(:,:,1:10,i) = b(1:10)
end do
The code is supposed to be copying the contents of the array b into the relevant 3rd dimension elements of array a such that a(i,j,k,l) = b(k) for any values of i and j (for fixed l).
Compiling the following program:
program test
implicit none
integer :: i
integer :: a(10,10,10,10), b(10)
do i = 1,10
a(:,:,1:10,i) = b(1:10)
end do
end program test
leads to the error message: 0008) a(:,:,1:10,i) = b(1:10) *** Rank 1 arrays cannot be mixed with rank 3 arrays in an array expression
Now, I know that this code compiles under 4.9.1 and pretty sure it comppiled fine under 5.01. I am now using 5.10 and the code does not compile.
Am I trying to do something that should never have worked?
Mark.