Comment 4 for bug 994038

Revision history for this message
Nick Papior (nickpapior) wrote :

Just as David Strubbe, I get the exact same errors on my setup.
It seems like it is due to a too big string array in the tests_module. The passed variable is in consecutive memory, which doesn't follow the readed values.

If I correct the routine interface:
subroutine check_read_nD(ncid, varname, type, dims, lstat, error_data)
    ...
    character(len = 256), allocatable :: strings(:)

to:

subroutine check_read_nD(ncid, varname, type, dims, lstat, error_data)
    ...
    character(len = dims(1)), allocatable :: strings(:)

all tests pass.

I have attached a patch for completeness.