This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR44582 - gfortran generates wrong results due to wrong ABI in function with array return
- From: Tobias Burnus <burnus at net-b dot de>
- To: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- Cc: fortran at gcc dot gnu dot org, gcc-patches <gcc-patches at gcc dot gnu dot org>, burnus at gcc dot gnu dot org, yin at absoft dot com
- Date: Mon, 28 Jun 2010 20:21:59 +0200
- Subject: Re: [Patch, fortran] PR44582 - gfortran generates wrong results due to wrong ABI in function with array return
- References: <AANLkTil-gqzM_IUMoJVCsgKtV4ymWgOSotoMa39oCWFQ@mail.gmail.com>
Paul Richard Thomas wrote:
> Bootstrapped and regtested on FC9/x86_64 - OK for trunk, 4.5,4.4 and 4.3?
>
Thanks for the patch, which is OK - except for the following nit:
! arrayfunc_assign_needs_temporary (gfc_expr * expr1, gfc_expr * expr2)
[...]
/* Elemental functions don't need a temporary anyway. */
if (expr2->value.function.esym != NULL
&& expr2->value.function.esym->attr.elemental)
! return true;
I think the comment is misleading - given the function name and the return value; can you make the comment a bit clearer?
Tobias
> 2010-06-28 Paul Thomas <pault@gcc.gnu.org>
>
> PR fortran/44582
> * trans-expr.c (arrayfunc_assign_needs_temporary): New function
> to determine if a function assignment can be made without a
> temporary.
> (gfc_trans_arrayfunc_assign): Move all the conditions that
> suppress the direct function call to the above new functon and
> call it.
>
> 2010-06-28 Paul Thomas <pault@gcc.gnu.org>
>
> PR fortran/44582
> * gfortran.dg/aliasing_array_result_1.f90 : New test.
>