This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [gfortran] Fix PR17615: Wrong symbol used when genrating code
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- Cc: GCC Fortran mailing list <fortran at gcc dot gnu dot org>,patch <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 24 Sep 2004 18:47:15 +0200
- Subject: Re: [gfortran] Fix PR17615: Wrong symbol used when genrating code
- References: <41544CC7.9070107@physik.uni-muenchen.de>
Tobias Schlüter wrote:
> Bubblestrapped and tested. I will also add a testcase.
When trying to reduce the testcase, I ran into a problem due to an obvious
defect of the original patch. Surprisingly it doesn't trigger with the
testcase from the PR. Updated patch below, ChangeLog is the same as before.
Ok, if testing passes?
- Tobi
Index: trans-expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/trans-expr.c,v
retrieving revision 1.28
diff -u -p -r1.28 trans-expr.c
--- trans-expr.c 17 Sep 2004 21:54:57 -0000 1.28
+++ trans-expr.c 24 Sep 2004 16:45:14 -0000
@@ -2007,8 +2007,8 @@ gfc_trans_arrayfunc_assign (gfc_expr * e
/* The frontend doesn't seem to bother filling in expr->symtree for intrinsic
functions. */
gcc_assert (expr2->value.function.isym
- || (gfc_return_by_reference (expr2->symtree->n.sym)
- && expr2->symtree->n.sym->result->attr.dimension));
+ || (gfc_return_by_reference (expr2->value.function.esym)
+ && expr2->value.function.esym->result->attr.dimension));
ss = gfc_walk_expr (expr1);
gcc_assert (ss != gfc_ss_terminator);