This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Tobias Burnus wrote:
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.

No problem, I already suspected so :) While I would have liked this solution if it was legal, it shouldn't be too hard to find a conservative one. Stay tuned for another try ;)


Thanks for the comments,
Daniel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]