[Bug fortran/66257] [5/6 Regression] ELEMENTAL procedure pointer component XX is not allowed as an actual argument
mikael at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri May 22 21:42:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66257
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikael at gcc dot gnu.org
--- Comment #2 from Mikael Morin <mikael at gcc dot gnu.org> ---
Draft patch, not tested
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index fbf260f..a46ab60 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -1981,7 +1981,8 @@ resolve_actual_arglist (gfc_actual_arglist *arg,
procedure_type ptype,
}
comp = gfc_get_proc_ptr_comp(e);
- if (comp && comp->attr.elemental)
+ if (e->expr_type == EXPR_VARIABLE
+ && comp && comp->attr.elemental)
{
gfc_error ("ELEMENTAL procedure pointer component %qs is not "
"allowed as an actual argument at %L", comp->name,
More information about the Gcc-bugs
mailing list