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: [fortran, patch] Fix pow op.


On Thu, Aug 04, 2005 at 12:05:10PM +0800, Feng Wang wrote:
> This patch fixed pow operation. We should evaluate the first operator. 
> 
> 
> Index: trans-expr.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/fortran/trans-expr.c,v
> retrieving revision 1.55
> diff -c -3 -p -r1.55 trans-expr.c
> *** trans-expr.c	4 Aug 2005 03:06:12 -0000	1.55
> --- trans-expr.c	4 Aug 2005 03:37:41 -0000
> *************** gfc_conv_power_op (gfc_se * se, gfc_expr
> *** 654,659 ****
> --- 654,660 ----
>   
>     gfc_init_se (&lse, se);
>     gfc_conv_expr_val (&lse, expr->value.op.op1);
> +   lse.expr = gfc_evaluate_now (lse.expr, &lse.pre);
>     gfc_add_block_to_block (&se->pre, &lse.pre);
>   
>     gfc_init_se (&rse, se);

This is ok for both mainline and 4.0.  Please, include a
ChangeLog entry with your patches.

-- 
Steve


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