------- Comment #1 from linuxl4 at sohu dot com 2010-08-19 09:14 ------- module ptrmod contains subroutine lengthX(x, i) implicit none real, pointer, intent(out) :: x(:)=>null() integer :: i allocate(x(i)) x=i end subroutine end module
program main use ptrmod implicit none real, pointer :: x(:) integer :: i do i=1,5 call lengthX(x, i) print *, size(x), x enddo if(associated(x)) deallocate(x) x=>null() end program -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45337