aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-02-13 19:57:24 +0000
committerJakub Jelinek <jakub@redhat.com>2012-02-13 19:57:24 +0000
commitcb6602bcb5d7596926bf10993fc7881cdd1582f5 (patch)
treeb71a0bc11fe8a3e8f3698eb3255d3403deec905e /gcc/omp-low.c
parent412d8849feb1ba4caf9efd8fca881c340f0565e7 (diff)
PR middle-end/52230
* omp-low.c (expand_omp_for): If a static schedule without chunk size has NULL region->cont, force fd.chunk_size to be integer_zero_node. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@184165 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 8ab689d0152..db715947df0 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -3,7 +3,7 @@
marshalling to implement data sharing and copying clauses.
Contributed by Diego Novillo <dnovillo@redhat.com>
- Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of GCC.
@@ -4664,6 +4664,9 @@ expand_omp_for (struct omp_region *region)
{
int fn_index, start_ix, next_ix;
+ if (fd.chunk_size == NULL
+ && fd.sched_kind == OMP_CLAUSE_SCHEDULE_STATIC)
+ fd.chunk_size = integer_zero_node;
gcc_assert (fd.sched_kind != OMP_CLAUSE_SCHEDULE_AUTO);
fn_index = (fd.sched_kind == OMP_CLAUSE_SCHEDULE_RUNTIME)
? 3 : fd.sched_kind;