[Patch, Fortran] [RFC] PR fortran/36746 / missing part from PR 32095?

Tobias Burnus tobias.burnus@physik.fu-berlin.de
Thu Sep 4 20:30:00 GMT 2008


Hi Daniel,

Daniel Kraft wrote:
> On the other hand, however, code that gets now
> rejected is:
>
> IMPLICIT TYPE(t) (x)
> DIMENSION x(:)
> INTEGER :: x ! 'x' already has a type (TYPE(t))!
>
> Is code like that legal?

I believe so - at least I could not find anything in the standard which
implies otherwise; additionally, NAG f95, g95, ifort, sunf95, gfortran
and openf95 compile the program without warning/error.
It also makes sense since in the dimension statement the type of "x"
does not matter at all.

That is quite different from 32095. For specification expressions (cf.
7.1.6.2, quoted in PR 32095) this is different: Here, the complete type
spec might be crutial.

Thus, the patch is unfortunately NOT OK.

Tobias



More information about the Fortran mailing list