This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, fortran] [08/66] inline sum and product: Preliminary cleanups: Remove redundant condition.


As the first line of context shows, if the first condition is false, the second
is false too. Thus, the first condition is useless.
OK?

Attachment: pr43829-8.CL
Description: Text document

diff --git a/trans-array.c b/trans-array.c
index 83fa7b6..5500ec4 100644
--- a/trans-array.c
+++ b/trans-array.c
@@ -815,7 +815,7 @@ get_array_ref_dim (gfc_ss_info *info, int loop_dim)
   array_dim = info->dim[loop_dim];
 
   for (n = 0; n < info->dimen; n++)
-    if (n != loop_dim && info->dim[n] < array_dim)
+    if (info->dim[n] < array_dim)
       array_ref_dim++;
 
   return array_ref_dim;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]