I believe the code below is valid and GNU, Intel and NAG seem to agree.
module pg_test type point real(kind=8) :: coo(3) = [0.0d0,0.0d0,0.0d0] end type point type, extends(point) :: waypoint integer :: cnt end type waypoint contains subroutine filament_init( points_in) implicit none class(point), intent(in) :: points_in(:) class(point), allocatable :: points(:) allocate(points(size(points_in)),source=points_in) print *, points(1)%coo(1) select type (points) type is (waypoint) print *, 'type is waypoint' class default print *, points(1)%coo(1) print *, points_in(1)%coo(1) end select end subroutine filament_init end module pg_test program test print *, 'hello' end program test
But pgfortran 13.7 throws the following severe at compile time:
PGF90-S-0076-Subscripts specified for non-array variable points (test.f90: 23)
$ pgfortran --version
pgfortran 13.7-0 64-bit target on x86-64 Linux -tp sandybridge
Let me know if you need more information to reproduce