To all Fortran experts.
At 19:24 03-07-02 -0500, Aleksandar Donev wrote:
>Today is my bug finding day--2 bugs in 1 day in two different compilers
>:( Before I complain to the vendor, just a quick verification. This
>simple program:
>
>program bug
> type A
> real :: x
> endtype
>
> type B
> type(A), pointer :: t
> endtype
>
> type(B) :: test
> real, pointer :: p
>
> allocate(test%t)
> p => test%t%x
>end program bug
>
>fails with a certain (immature) compiler:
>
> p => test%t%x
> ^
>Error 103 : The target of a pointer must be a target or a pointer
>
>which I believe is wrong since test does not need the TARGET attribute
>since t is a pointer and does x inherits it implicitly from t.
>
>Correct?
If this is correct, it is new to me. My - more or less inconscious -idea
alway was that the 'x' component only could have an implicit
TARGET attribute if it was a pointer.
I must say that my documentation consists of
(1) ISO/IEC 1539 (1991) (E)
(2) Draft J3/97-007R1
(3) Draft J3/02-007R1
I now find that (2) and (3) differ from (1) in section 6.1.2.
The description of INTENT, TARGET or PARAMETER attribute propagation
seems to have disappeared.
Can someone explain?
BTW: My two compilers accept the above program with NO ERRORS.
Best regards,
\---
Jan van Oosterwijk
Netherlands
mailto:[log in to unmask]
http://huizen.dto.tudelft.nl/vanOosterwijk/
|