From f12f786b8679b37570b3509ae1c11453830c47b0 Mon Sep 17 00:00:00 2001 From: Steve Kargl Date: Mon, 17 May 2004 23:54:09 +0000 Subject: [PATCH] arith.c (gfc_arith_power): Complex number raised to 0 power is 1. 2004-05-17 Steve Kargl * arith.c (gfc_arith_power): Complex number raised to 0 power is 1. From-SVN: r81959 --- gcc/fortran/ChangeLog | 4 ++++ gcc/fortran/arith.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 1fed01aee95..376c9f9c1b0 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2004-05-17 Steve Kargl + + * arith.c (gfc_arith_power): Complex number raised to 0 power is 1. + 2004-05-17 Steve Kargl * arith.c (gfc_real2complex): Range checking wrong part of complex diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c index 5b4d7010427..0d81f730be4 100644 --- a/gcc/fortran/arith.c +++ b/gcc/fortran/arith.c @@ -1584,7 +1584,7 @@ gfc_arith_power (gfc_expr * op1, gfc_expr * op2, gfc_expr ** resultp) else { mpf_set_ui (result->value.complex.r, 1); - mpf_set_ui (result->value.complex.r, 0); + mpf_set_ui (result->value.complex.i, 0); } break;