This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran] Fix PR17615: Wrong symbol used when genrating code


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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]