[Bug fortran/59414] [OOP] Class array pointers: compile error on valid code (Different ranks in pointer assignment)
antony at cosmologist dot info
gcc-bugzilla@gcc.gnu.org
Sat Dec 7 12:33:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59414
--- Comment #5 from Antony Lewis <antony at cosmologist dot info> ---
Thanks for the quick fix!
The sourced allocate errors crop up in various places in the full code, and
already seem to be known in several bug reports, e.g.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44672
For example in this case you just get a compiler error:
module test
Type InterpGrid2D
REAL, pointer :: z(:,:) => NULL()
contains
procedure :: Init => InterpGrid2D_Init
end Type InterpGrid2D
contains
subroutine InterpGrid2D_Init(W, z)
class(InterpGrid2D):: W
REAL, INTENT(IN), pointer :: z(:,:)
allocate(W%z, source = z)
end subroutine InterpGrid2D_Init
end module
More information about the Gcc-bugs
mailing list