This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [Patch, fortran] PR44582 - gfortran generates wrong results due to wrong ABI in function with array return


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.
>   


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