aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog4
-rw-r--r--gcc/fortran/arith.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 1fed01a..376c9f9 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,9 @@
2004-05-17 Steve Kargl <kargls@comcast.net>
+ * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
+
+2004-05-17 Steve Kargl <kargls@comcast.net>
+
* arith.c (gfc_real2complex): Range checking wrong part of complex
number.
diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c
index 5b4d701..0d81f73 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;