arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
authorSteve Kargl <kargls@comcast.net>
Mon, 17 May 2004 23:54:09 +0000 (23:54 +0000)
committerTobias Schlüter <tobi@gcc.gnu.org>
Mon, 17 May 2004 23:54:09 +0000 (01:54 +0200)
2004-05-17  Steve Kargl  <kargls@comcast.net>

* arith.c (gfc_arith_power): Complex number raised to 0 power is 1.

From-SVN: r81959

gcc/fortran/ChangeLog
gcc/fortran/arith.c

index 1fed01aee95a8960b8bab4cbd7039e3f82c645f5..376c9f9c1b07bc904cb7b8f3792539fa7d6ae84c 100644 (file)
@@ -1,3 +1,7 @@
+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
index 5b4d7010427536903b68439f7eece08b8c2409b3..0d81f730be4dae936efdceb62c62fee615acb509 100644 (file)
@@ -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;