mirror of git://gcc.gnu.org/git/gcc.git
re PR c++/81011 (ICE with #pragma omp task and inaccessible copy-constructor)
PR c++/81011 * cp-gimplify.c (cxx_omp_finish_clause): When changing clause to OMP_CLAUSE_SHARED, also clear OMP_CLAUSE_SHARED_FIRSTPRIVATE and OMP_CLAUSE_SHARED_READONLY flags. * g++.dg/gomp/pr81011.C: New test. From-SVN: r249031
This commit is contained in:
parent
0d05f68547
commit
34361776fb
|
|
@ -1,3 +1,10 @@
|
|||
2017-06-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/81011
|
||||
* cp-gimplify.c (cxx_omp_finish_clause): When changing clause
|
||||
to OMP_CLAUSE_SHARED, also clear OMP_CLAUSE_SHARED_FIRSTPRIVATE
|
||||
and OMP_CLAUSE_SHARED_READONLY flags.
|
||||
|
||||
2017-06-08 Jan Hubicka <hubicka@ucw.cz>
|
||||
|
||||
* cp-tree.h (lang_check_failed): Annotate by ATTRIBUTE_COLD.
|
||||
|
|
|
|||
|
|
@ -1912,7 +1912,11 @@ cxx_omp_finish_clause (tree c, gimple_seq *)
|
|||
make_shared = true;
|
||||
|
||||
if (make_shared)
|
||||
OMP_CLAUSE_CODE (c) = OMP_CLAUSE_SHARED;
|
||||
{
|
||||
OMP_CLAUSE_CODE (c) = OMP_CLAUSE_SHARED;
|
||||
OMP_CLAUSE_SHARED_FIRSTPRIVATE (c) = 0;
|
||||
OMP_CLAUSE_SHARED_READONLY (c) = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Return true if DECL's DECL_VALUE_EXPR (if any) should be
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
2017-06-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/81011
|
||||
* g++.dg/gomp/pr81011.C: New test.
|
||||
|
||||
PR middle-end/81005
|
||||
* c-c++-common/ubsan/align-10.c: New test.
|
||||
* c-c++-common/ubsan/null-13.c: New test.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
// PR c++/81011
|
||||
// { dg-do compile }
|
||||
|
||||
class A { A (const A&); }; // { dg-message "declared private here" }
|
||||
void foo (const A&);
|
||||
|
||||
void
|
||||
bar (A& a)
|
||||
{
|
||||
#pragma omp task // { dg-error "is private within this context" }
|
||||
foo (a);
|
||||
}
|
||||
|
||||
void
|
||||
baz (A& a)
|
||||
{
|
||||
#pragma omp task firstprivate (a) // { dg-error "is private within this context" }
|
||||
foo (a);
|
||||
}
|
||||
Loading…
Reference in New Issue