Hi,
I was wondering whats wrong with the way I'm passing my allocatable arrays. I've narrowed down the error to something similar to this:
program test_array
integer, allocatable :: test)
integer n
allocate(test(5))
test = (/ 1,2,3,4,5 /)
call test_routine(test,n)
write(*,*),n
end
subroutine test_routine(test,n)
integer, allocatable :: test)
integer n
n = size(test)
write(*,*), test
return
end
The thing is that it works in debug (for both 32 and 64 bit) and returns the value n = 5, but in release I always get n = 0 and test is blank.
Thanks in advance
I was wondering whats wrong with the way I'm passing my allocatable arrays. I've narrowed down the error to something similar to this:
program test_array
integer, allocatable :: test)
integer n
allocate(test(5))
test = (/ 1,2,3,4,5 /)
call test_routine(test,n)
write(*,*),n
end
subroutine test_routine(test,n)
integer, allocatable :: test)
integer n
n = size(test)
write(*,*), test
return
end
The thing is that it works in debug (for both 32 and 64 bit) and returns the value n = 5, but in release I always get n = 0 and test is blank.
Thanks in advance