diff options
author | Jakub Jelinek <jakub@redhat.com> | 2014-06-12 23:10:11 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2014-06-12 23:10:11 +0200 |
commit | 9cf32741aabefe8fa90bad887b694dbf7ad29726 (patch) | |
tree | c4172ecef31a5a6826c56350eb72c44c9d78516b /gcc/c-family | |
parent | 62984918665f0c82b187293ba762bc2edb32ab92 (diff) | |
download | gcc-9cf32741aabefe8fa90bad887b694dbf7ad29726.zip gcc-9cf32741aabefe8fa90bad887b694dbf7ad29726.tar.gz gcc-9cf32741aabefe8fa90bad887b694dbf7ad29726.tar.bz2 |
re PR middle-end/61486 (ICE with #pragma omp teams)
PR middle-end/61486
* gimplify.c (struct gimplify_omp_ctx): Add distribute field.
(gimplify_adjust_omp_clauses): Don't or in GOVD_LASTPRIVATE
if outer combined construct is distribute.
(gimplify_omp_for): For OMP_DISTRIBUTE set
gimplify_omp_ctxp->distribute.
* omp-low.c (scan_sharing_clauses) <case OMP_CLAUSE_SHARED>: For
GIMPLE_OMP_TEAMS, if decl isn't global in outer context, record
mapping into decl map.
c-family/
* c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
#pragma omp target teams or
#pragma omp {,target }teams distribute simd.
testsuite/
* c-c++-common/gomp/pr61486-1.c: New test.
* c-c++-common/gomp/pr61486-2.c: New test.
From-SVN: r211596
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/c-family/c-omp.c | 9 |
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index dd91f6b..0348310 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,10 @@ +2014-06-12 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/61486 + * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in + #pragma omp target teams or + #pragma omp {,target }teams distribute simd. + 2014-06-12 Jason Merrill <jason@redhat.com> * c.opt (Wabi=, fabi-compat-version): New. diff --git a/gcc/c-family/c-omp.c b/gcc/c-family/c-omp.c index dd0a45d..6a0e419 100644 --- a/gcc/c-family/c-omp.c +++ b/gcc/c-family/c-omp.c @@ -789,8 +789,13 @@ c_omp_split_clauses (location_t loc, enum tree_code code, else if ((mask & (OMP_CLAUSE_MASK_1 << PRAGMA_OMP_CLAUSE_NUM_TEAMS)) != 0) { - /* This must be #pragma omp {,target }teams distribute. */ - gcc_assert (code == OMP_DISTRIBUTE); + /* This must be one of + #pragma omp {,target }teams distribute + #pragma omp target teams + #pragma omp {,target }teams distribute simd. */ + gcc_assert (code == OMP_DISTRIBUTE + || code == OMP_TEAMS + || code == OMP_SIMD); s = C_OMP_CLAUSE_SPLIT_TEAMS; } else if ((mask & (OMP_CLAUSE_MASK_1 |