Message ID | 5560F288.5080800@sfr.fr |
---|---|
State | New |
Headers | show |
Hi Mikael, Yes, that's fine for 5 and 6. Thanks for the patch. Paul On 23 May 2015 at 23:35, Mikael Morin <mikael.morin@sfr.fr> wrote: > Hello, > > For PR 63727, a check was introduced, rejecting procedure pointer > components used as actual arguments: > foo(obj%proc_comp) > but it had the side effect of also rejecting > foo(obj%proc_comp(arg)) > > Fixed by the attached patch. > Tested on x86_64-linux. OK for 6/5 ? > > Mikael > > >
2015-05-23 Mikael Morin <mikael@gcc.gnu.org> PR fortran/66257 * resolve.c (resolve_actual_arglist): Don't throw an error if the argument with procedure pointer component is not a variable. 2015-05-23 Mikael Morin <mikael@gcc.gnu.org> PR fortran/66257 * typebound_call_27.f90: New file. 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,