[Bug fortran/66257] [5/6 Regression] ELEMENTAL procedure pointer component XX is not allowed as an actual argument

2015-05-29 Thread mikael at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66257

Mikael Morin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Mikael Morin  ---
Fixed for 6.1 and 5.2.
Closing.
Thanks for the bug report.


[Bug fortran/66257] [5/6 Regression] ELEMENTAL procedure pointer component XX is not allowed as an actual argument

2015-05-29 Thread mikael at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66257

--- Comment #5 from Mikael Morin  ---
Author: mikael
Date: Fri May 29 19:04:30 2015
New Revision: 223875

URL: https://gcc.gnu.org/viewcvs?rev=223875&root=gcc&view=rev
Log:
PR fortran/66257
gcc/fortran/
* resolve.c (resolve_actual_arglist): Don't throw an error
if the argument with procedure pointer component is not a variable.
gcc/testsuite/
* typebound_call_27.f90: New file.


Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/typebound_call_27.f90
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/resolve.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog


[Bug fortran/66257] [5/6 Regression] ELEMENTAL procedure pointer component XX is not allowed as an actual argument

2015-05-24 Thread mikael at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66257

--- Comment #4 from Mikael Morin  ---
Author: mikael
Date: Sun May 24 14:55:50 2015
New Revision: 223631

URL: https://gcc.gnu.org/viewcvs?rev=223631&root=gcc&view=rev
Log:
PR fortran/66257
gcc/fortran/
* resolve.c (resolve_actual_arglist): Don't throw an error
if the argument with procedure pointer component is not a variable.
gcc/testsuite/
* typebound_call_27.f90: New file.


Added:
trunk/gcc/testsuite/gfortran.dg/typebound_call_27.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog


[Bug fortran/66257] [5/6 Regression] ELEMENTAL procedure pointer component XX is not allowed as an actual argument

2015-05-22 Thread mikael at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66257

--- Comment #3 from Mikael Morin  ---
(In reply to Dominique d'Humieres from comment #1)
> Although I have marked the PR as a regression, I am not sure that it is not
> INVALID: the error has been introduced on purpose.

I think the error applies to procedure pointers, not to the result of procedure
pointer calls.  I haven't checked the standard yet though.


[Bug fortran/66257] [5/6 Regression] ELEMENTAL procedure pointer component XX is not allowed as an actual argument

2015-05-22 Thread mikael at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66257

Mikael Morin  changed:

   What|Removed |Added

 CC||mikael at gcc dot gnu.org

--- Comment #2 from Mikael Morin  ---
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,


[Bug fortran/66257] [5/6 Regression] ELEMENTAL procedure pointer component XX is not allowed as an actual argument

2015-05-22 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66257

Dominique d'Humieres  changed:

   What|Removed |Added

   Priority|P3  |P4
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-05-22
 CC||burnus at gcc dot gnu.org,
   ||janus at gcc dot gnu.org
Summary|Regression: ELEMENTAL   |[5/6 Regression] ELEMENTAL
   |procedure pointer component |procedure pointer component
   |XX is not allowed as an |XX is not allowed as an
   |actual argument |actual argument
 Ever confirmed|0   |1
   Severity|major   |normal

--- Comment #1 from Dominique d'Humieres  ---
Likely introduced by revision r218751 for pr63727 (see the thread starting at
https://gcc.gnu.org/ml/fortran/2014-12/msg00075.html).

Although I have marked the PR as a regression, I am not sure that it is not
INVALID: the error has been introduced on purpose.