From 6a047254ef2ce9c0952ff7e2020dc29d86227d43 Mon Sep 17 00:00:00 2001 From: Craig Burley Date: Wed, 3 Jun 1998 14:12:26 +0000 Subject: [PATCH] (ffecom_expr_): Fix D**I and Z**I cases to not convert (DOUBLE PRECISION) D and (DOUBLE COMPLEX) Z to INTEGER. (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 | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/gcc/f/com.c b/gcc/f/com.c index 9d4e9d6f5df5..286d0c7abd3d 100644 --- a/gcc/f/com.c +++ b/gcc/f/com.c @@ -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); -- 2.47.2