Commit 5ec1334b by Steven Bosscher Committed by Steven G. Kargl

re PR fortran/28439 ([4.1 only] Multiple evaluations of arithmetic if condition)

2006-07-22  Steven Bosscher  <steven@gcc.gnu.org> 

	PR fortran/28439
	* trans-stmt.c (gfc_trans_arithmetic_if): Evaluate the condition once.

From-SVN: r115677
parent f8145d0e
2006-07-22 Steven Bosscher <steven@gcc.gnu.org>
PR fortran/28439
* trans-stmt.c (gfc_trans_arithmetic_if): Evaluate the condition once.
2006-07-16 Jakub Jelinek <jakub@redhat.com>
PR fortran/28390
......
......@@ -663,6 +663,7 @@ gfc_trans_arithmetic_if (gfc_code * code)
/* Pre-evaluate COND. */
gfc_conv_expr_val (&se, code->expr);
se.expr = gfc_evaluate_now (se.expr, &se.pre);
/* Build something to compare with. */
zero = gfc_build_const (TREE_TYPE (se.expr), integer_zero_node);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment