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]

[gomp] Fix think in determine_parallel_type


I got the test for static loops wrong the first time.


	* omp-low.c (determine_parallel_type): Fix thinko in handling
	of statically scheduled loops.

Index: omp-low.c
===================================================================
--- omp-low.c	(revision 106316)
+++ omp-low.c	(working copy)
@@ -793,7 +793,8 @@ determine_parallel_type (tree stmt)
 	     gain in using the combined call.  */
 	  tree clauses = OMP_FOR_CLAUSES (t);
 	  tree c = find_omp_clause (clauses, OMP_CLAUSE_SCHEDULE);
-	  if (c && OMP_CLAUSE_SCHEDULE_KIND (c) == OMP_CLAUSE_SCHEDULE_STATIC)
+	  if (c == NULL_TREE
+	      || OMP_CLAUSE_SCHEDULE_KIND (c) == OMP_CLAUSE_SCHEDULE_STATIC)
 	    par_type = IS_PARALLEL;
 	  else if (find_omp_clause (clauses, OMP_CLAUSE_ORDERED))
 	    par_type = IS_PARALLEL;


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