[Bug fortran/52832] ASSOCIATE construct with proc-pointer selector is rejected
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Apr 2 10:31:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52832
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-04-02 10:30:43 UTC ---
>From Fortran 2008:
R804 association is associate-name => selector
R805 selector is expr
or variable
R602 variable is designator
or expr
R601 designator is object-name
and "expr" boils down to:
R701 primary is constant
or designator ! See above
or ...
Thus, it boils down to the question whether that's fulfilled for a procedure
pointer.
Note that there such entries, which make me inclined that it is not valid:
R554 saved-entity is object-name
or proc-pointer-name
R639 pointer-object is variable-name [or ...]
or proc-pointer-name
Possible usage of proc-pointer selectors:
associate(f => very%long%name%procptr)
f => something ! << usage as "variable"
a = f(4) + f(7) * f(x) + ... ! << usage as "expr"
where the latter is more useful.
A quick test shows that ifort, pgf95 and crayftn accept proc-pointers in
ASSOCIATE.
More information about the Gcc-bugs
mailing list