aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-05-27 23:33:37 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2019-05-27 23:33:37 +0200
commit8e7757ba17b1aeb83387c33004149a185a5fa137 (patch)
tree7b0ead544da63501144fb40b91e57cef10f84917 /gcc/gimplify.c
parent36c7a3fff99326a1dd45f495ee8e1b6bfd6cf9f5 (diff)
downloadgcc-8e7757ba17b1aeb83387c33004149a185a5fa137.zip
gcc-8e7757ba17b1aeb83387c33004149a185a5fa137.tar.gz
gcc-8e7757ba17b1aeb83387c33004149a185a5fa137.tar.bz2
gimplify.c (gimplify_scan_omp_clauses): Allow lastprivate conditional on sections construct.
* gimplify.c (gimplify_scan_omp_clauses): Allow lastprivate conditional on sections construct. * omp-low.c (lower_lastprivate_conditional_clauses): Handle sections construct. (lower_omp_sections): Handle lastprivate conditional. (lower_omp_1) <case GIMPLE_ASSIGN>: Handle sections construct with lastprivate_conditional_map. * omp-expand.c (expand_omp_sections): Handle lastprivate conditional. libgomp/ * testsuite/libgomp.c-c++-common/lastprivate_conditional_4.c: New test. From-SVN: r271673
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index b8b7e80..a0177b2 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -8143,7 +8143,7 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
}
if (OMP_CLAUSE_LASTPRIVATE_CONDITIONAL (c))
{
- if (code == OMP_FOR)
+ if (code == OMP_FOR || code == OMP_SECTIONS)
flags |= GOVD_LASTPRIVATE_CONDITIONAL;
else
{