Commit 9abd5ed9 by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/52230 (OpenMP: Simple C program triggers SIGSEGV at execution)

	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.

From-SVN: r184165
parent a905672b
2012-02-13 Jakub Jelinek <jakub@redhat.com>
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.
2012-02-13 Andrew MacLeod <amacleod@redhat.com> 2012-02-13 Andrew MacLeod <amacleod@redhat.com>
PR c/52190 PR c/52190
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
marshalling to implement data sharing and copying clauses. marshalling to implement data sharing and copying clauses.
Contributed by Diego Novillo <dnovillo@redhat.com> 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. Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -4664,6 +4664,9 @@ expand_omp_for (struct omp_region *region) ...@@ -4664,6 +4664,9 @@ expand_omp_for (struct omp_region *region)
{ {
int fn_index, start_ix, next_ix; 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); gcc_assert (fd.sched_kind != OMP_CLAUSE_SCHEDULE_AUTO);
fn_index = (fd.sched_kind == OMP_CLAUSE_SCHEDULE_RUNTIME) fn_index = (fd.sched_kind == OMP_CLAUSE_SCHEDULE_RUNTIME)
? 3 : fd.sched_kind; ? 3 : fd.sched_kind;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment