This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gomp] Fix think in determine_parallel_type
- From: Diego Novillo <dnovillo at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 1 Nov 2005 01:29:12 -0500
- Subject: [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;