From: Jakub Jelinek Date: Tue, 14 Feb 2012 23:32:39 +0000 (+0100) Subject: backport: re PR middle-end/52230 (OpenMP: Simple C program triggers SIGSEGV at execution) X-Git-Tag: releases/gcc-4.6.3~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb50f041a6d71af15cab1776906ddb3ddee9458d;p=thirdparty%2Fgcc.git backport: re PR middle-end/52230 (OpenMP: Simple C program triggers SIGSEGV at execution) Backported from mainline 2012-02-13 Jakub Jelinek 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: r184240 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 698804e460c2..1ba4443d3b83 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2012-02-14 Jakub Jelinek + Backported from mainline + 2012-02-13 Jakub Jelinek + + 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. + PR bootstrap/51969 Backported from mainline 2011-11-08 Michael Matz diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 364f51e3bfd6..bb0017a76713 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -4618,6 +4618,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;