------- Comment #3 from burnus at gcc dot gnu dot org  2006-12-07 18:49 -------
> I agree that other compilers handle this OK but is it valid?

I think it is. Think of the form

  interface operator(=)
     module procedure myassign
  end interface

here the "generic-spec" is not a "generic-name" but an
"operator (defined operator)", but for this case it should be clear that one
can add "myassign" to the generic interface which contains the intrinsic
operator(=).

Analogously, I don't see any reason why one shouldn't be able to enhance
"random_number" by a procedure which takes different arguments.


And now more formally

"12.4.4 Resolving named procedure references"
"(1) A procedure name is established to be generic in a scoping unit
     (a) if that scoping unit contains an interface block with that name;"

Next step:
"12.4.4.1 Resolving procedure references to names established to be generic"
"(3) If (1) and (2) do not apply, if the scoping unit contains either an
INTRINSIC attribute specification for that name"

(If one adds to "random_vector(t)" an "Intrinsic random_number" it indeed works
also with gfortran.)

Ok, still not resolved, next try:

"12.4.4.3 Resolving procedure references to names not established"
"(2) If (1) does not apply, if the name is the name of an intrinsic procedure,
and if there is agreement between the reference and the status of the intrinsic
procedure as being a function or subroutine, the reference is to that intrinsic
procedure."

Uff, finally found something which resolves it.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2006-12-07 18:49:57
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30081

Reply via email to