[Bug fortran/45337] intent(out) and pointer => null()

2010-08-19 Thread linuxl4 at sohu dot com
--- Comment #4 from linuxl4 at sohu dot com 2010-08-19 09:26 --- Too fast your answer interrupt My question. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45337

[Bug fortran/45337] intent(out) and pointer => null()

2010-08-19 Thread linuxl4 at sohu dot com
--- Comment #3 from linuxl4 at sohu dot com 2010-08-19 09:22 --- module ptrmod implicit none type inde real :: x end type contains subroutine lengthY(indexx) implicit none type(inde), pointer, intent(out) :: indexx(:)=>null() end subroutine end module program main

[Bug fortran/45337] intent(out) and pointer => null()

2010-08-19 Thread jv244 at cam dot ac dot uk
--- Comment #2 from jv244 at cam dot ac dot uk 2010-08-19 09:22 --- (In reply to comment #1) > module ptrmod > contains > subroutine lengthX(x, i) >implicit none >real, pointer, intent(out) :: x(:)=>null() you can't initialize a dummy argument, since initialization implies save.

[Bug fortran/45337] intent(out) and pointer => null()

2010-08-19 Thread linuxl4 at sohu dot com
--- 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