[Bug fortran/56968] [F03] Issue with a procedure defined with a generic name returning procedure pointer
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56968 janus at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Keywords||rejects-valid Last reconfirmed||2013-04-15 CC||janus at gcc dot gnu.org AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 Summary|Issue with a procedure |[F03] Issue with a |defined with a generic name |procedure defined with a |returning procedure pointer |generic name returning ||procedure pointer --- Comment #1 from janus at gcc dot gnu.org 2013-04-15 14:44:25 UTC --- Here is a draft patch which fixes the behavior for the test case: Index: gcc/fortran/expr.c === --- gcc/fortran/expr.c(revision 197943) +++ gcc/fortran/expr.c(working copy) @@ -3540,7 +3540,11 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_ex } else if (rvalue-expr_type == EXPR_FUNCTION) { - s2 = rvalue-symtree-n.sym-result; + if (rvalue-symtree-n.sym-attr.generic) +s2 = rvalue-value.function.esym-result; + else +s2 = rvalue-symtree-n.sym-result; + name = s2-name; } else Regtesting now ...
[Bug fortran/56968] [F03] Issue with a procedure defined with a generic name returning procedure pointer
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56968 --- Comment #2 from Dominique d'Humieres dominiq at lps dot ens.fr 2013-04-15 15:02:48 UTC --- For the record, gfortran 4.4.6 compiles the test, but not 4.5.3, 4.6.4, 4.7.3, 4.8.0, and trunk.