--- Comment #3 from jv244 at cam dot ac dot uk 2009-08-20 07:09 ---
the pointers are undefined and thus it is not standard conforming to ask for
their state. This is like asking if an uninitialized integer is 0 or not.
you can use
type S0
real, dimension(:), pointer :: P =
--- Comment #4 from burnus at gcc dot gnu dot org 2009-08-20 07:12 ---
(In reply to comment #0)
type S0
real, dimension(:), pointer :: P ! NLEV
end type S0
type (S0) :: x0
write (*,*) 'x0%P', associated(x0%P)
You have never initialized the pointer x0%P.
--- Comment #1 from evan dot fishbein at jpl dot nasa dot gov 2009-08-20
04:11 ---
(In reply to comment #0)
The following code segment
program scr
type S1
real, dimension(:), pointer :: P ! NLEV
real, dimension(:), pointer :: t ! NLEV
end type
--- Comment #2 from kargl at gcc dot gnu dot org 2009-08-20 05:59 ---
gfortran 4.5.0 gives
REMOVE:kargl[5] ./z
x0%P T
x0%P T
x1%P F
x1%P T
Given that you are using a f95 compiler, I believe that you are
invoking processor-dependent behavior. F95 states
2.4.6Pointer
A