(ffecom_expr_): Fix D**I and Z**I cases to not convert (DOUBLE PRECISION) D and ...
authorCraig Burley <burley@gnu.org>
Wed, 3 Jun 1998 14:12:26 +0000 (14:12 +0000)
committerDave Love <fx@gcc.gnu.org>
Wed, 3 Jun 1998 14:12:26 +0000 (14:12 +0000)
(ffecom_expr_): Fix D**I and Z**I cases to
not convert (DOUBLE PRECISION) D and (DOUBLE COMPLEX) Z
to INTEGER.  (This is dead code here anyway.)

From-SVN: r20211

gcc/f/com.c

index 9d4e9d6f5df5269f90797b1729d7ec145de39e44..286d0c7abd3d672e36c30221a88428aa8e57a2ec 100644 (file)
@@ -3086,7 +3086,6 @@ ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest,
                  return item;
              }
 
-           ltkt = FFEINFO_kindtypeINTEGER1;
            rtkt = FFEINFO_kindtypeINTEGER1;
            switch (ffeinfo_basictype (ffebld_info (left)))
              {
@@ -3101,33 +3100,49 @@ ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest,
                    rtkt = FFEINFO_kindtypeINTEGER4;
                  }
                else
-                 code = FFECOM_gfrtPOW_II;
+                 {
+                   code = FFECOM_gfrtPOW_II;
+                   ltkt = FFEINFO_kindtypeINTEGER1;
+                 }
                break;
 
              case FFEINFO_basictypeREAL:
                if (ffeinfo_kindtype (ffebld_info (left))
                    == FFEINFO_kindtypeREAL1)
-                 code = FFECOM_gfrtPOW_RI;
+                 {
+                   code = FFECOM_gfrtPOW_RI;
+                   ltkt = FFEINFO_kindtypeREAL1;
+                 }
                else
-                 code = FFECOM_gfrtPOW_DI;
+                 {
+                   code = FFECOM_gfrtPOW_DI;
+                   ltkt = FFEINFO_kindtypeREAL2;
+                 }
                break;
 
              case FFEINFO_basictypeCOMPLEX:
                if (ffeinfo_kindtype (ffebld_info (left))
                    == FFEINFO_kindtypeREAL1)
-                 code = FFECOM_gfrtPOW_CI;     /* Overlapping result okay. */
+                 {
+                   code = FFECOM_gfrtPOW_CI;   /* Overlapping result okay. */
+                   ltkt = FFEINFO_kindtypeREAL1;
+                 }
                else
-                 code = FFECOM_gfrtPOW_ZI;     /* Overlapping result okay. */
+                 {
+                   code = FFECOM_gfrtPOW_ZI;   /* Overlapping result okay. */
+                   ltkt = FFEINFO_kindtypeREAL2;
+                 }
                break;
 
              default:
                assert ("bad pow_*i" == NULL);
                code = FFECOM_gfrtPOW_CI;       /* Overlapping result okay. */
+               ltkt = FFEINFO_kindtypeREAL1;
                break;
              }
            if (ffeinfo_kindtype (ffebld_info (left)) != ltkt)
              left = ffeexpr_convert (left, NULL, NULL,
-                                     FFEINFO_basictypeINTEGER,
+                                     ffeinfo_basictype (ffebld_info (left)),
                                      ltkt, 0,
                                      FFETARGET_charactersizeNONE,
                                      FFEEXPR_contextLET);