This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51082] [F03] Wrong result for a pointer to a proc-pointer component
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 10 Nov 2011 21:02:34 +0000
- Subject: [Bug fortran/51082] [F03] Wrong result for a pointer to a proc-pointer component
- Auto-submitted: auto-generated
- References: <bug-51082-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51082
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org
|gnu.org |
--- Comment #2 from janus at gcc dot gnu.org 2011-11-10 21:02:34 UTC ---
Fix:
Index: gcc/fortran/trans-expr.c
===================================================================
--- gcc/fortran/trans-expr.c (revision 181240)
+++ gcc/fortran/trans-expr.c (working copy)
@@ -5019,7 +5019,7 @@ gfc_conv_expr_reference (gfc_se * se, gfc_expr * e
&& ((expr->value.function.esym
&& expr->value.function.esym->result->attr.pointer
&& !expr->value.function.esym->result->attr.dimension)
- || (!expr->value.function.esym
+ || (!expr->value.function.esym && !expr->ref
&& expr->symtree->n.sym->attr.pointer
&& !expr->symtree->n.sym->attr.dimension)))
{