This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] coarray cleanup leftover


Hello,

This change
http://gcc.gnu.org/viewcvs?view=revision&revision=179689
removed references to gfc_loopinfo's codimen field and one conditional 
checking against gfc_loopinfo::dimen (as we had the convention that dimensions 
above dimen were codimensions).
I have noticed two more of those conditionals which I'm proposing for removal.

This is not a bug nor a regression, so this should normally wait for the next 
stage1. It is obvious on the other hand, and safe, as the 'n < loop->dimen' 
conditions are inside a 'for (n = 0; n < loop->dimen; n++)' loop.

Regression tested on x86_64-unknown-linux-gnu (with the just posted pr51250 
patch). OK for trunk?

Mikael

Attachment: cleanup_coarray.CL
Description: Text document

diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 2fb2d34..ee8f896 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -4341,9 +4341,9 @@ set_loop_bounds (gfc_loopinfo *loop)
 	}
 
       /* Transform everything so we have a simple incrementing variable.  */
-      if (n < loop->dimen && integer_onep (info->stride[dim]))
+      if (integer_onep (info->stride[dim]))
 	info->delta[dim] = gfc_index_zero_node;
-      else if (n < loop->dimen)
+      else
 	{
 	  /* Set the delta for this section.  */
 	  info->delta[dim] = gfc_evaluate_now (loop->from[n], &loop->pre);

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