What happens if I allocate a F90 pointer thus:
real, pointer :: abc(:)
allocate abc (nx*ny*nz)
I pass abc to a subroutine, where i redefine it as
real arg1(nx,ny,xz)
This seems to work fine.
But if I redefine as 2D array, I get a segfault.
real arg1(nx,ny)
With reordered arrays as above, it should work. Why does it fail? Any help will be appreciated.
Thanks.