The following error message is misleading:

"Error: GENERIC non-INTRINSIC procedure '%s' is not allowed as an actual
argument"

The problem is that any GENERIC procedure - intrinsic or not - is not allowed
as actual argument. (For "a dummy procedure[...], the associated actual
argument shall be the specific name".)
However, this problem never occurs for intrinsic procedures as all intrinsic
procedures which are allowed as actual argument (cf. 13.6) are also specific
functions. (And then applies: "If the specific name is also a generic name,
only the specific procedure is associated with the dummy argument.")

See also PR 33162 and PR 33847.

>From the Fortran 2003 standard:

"12.4.1.3 Actual arguments associated with dummy procedure entities"
[...]
"If a dummy argument is a dummy procedure without the POINTER attribute, the
associated actual argument shall be the specific name of an external, module,
dummy, or intrinsic procedure, an associated procedure pointer, or a reference
to a function that returns an associated procedure pointer. The only intrinsic
procedures permitted are those listed in 13.6 and not marked with a bullet (*).
If the specific name is also a generic name, only the specific procedure is
associated with the dummy argument."


-- 
           Summary: Fix misleading error message "GENERIC non-INTRINSIC
                    procedure not allowed as an actual argument"
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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

Reply via email to