openmp: Handle OMP_MASKED in potential_constant_expression_1 [PR103349]
WHen adding OMP_MASKED, I apparently forgot to handle it in potential_constant_expression_1, which means we can ICE on it. 2021-11-22 Jakub Jelinek <jakub@redhat.com> PR c++/103349 * constexpr.c (potential_constant_expression_1): Punt on OMP_MASKED. * g++.dg/gomp/masked-1.C: New test.
This commit is contained in:
parent
b5844cb0bc
commit
4b1e14346a
|
@ -8686,6 +8686,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now,
|
||||||
case OMP_SINGLE:
|
case OMP_SINGLE:
|
||||||
case OMP_SECTION:
|
case OMP_SECTION:
|
||||||
case OMP_MASTER:
|
case OMP_MASTER:
|
||||||
|
case OMP_MASKED:
|
||||||
case OMP_TASKGROUP:
|
case OMP_TASKGROUP:
|
||||||
case OMP_TARGET_UPDATE:
|
case OMP_TARGET_UPDATE:
|
||||||
case OMP_TARGET_ENTER_DATA:
|
case OMP_TARGET_ENTER_DATA:
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
// PR c++/103349
|
||||||
|
// { dg-do compile { target c++11 } }
|
||||||
|
|
||||||
|
int v;
|
||||||
|
|
||||||
|
void
|
||||||
|
foo (int x, int y)
|
||||||
|
{
|
||||||
|
[=] ()
|
||||||
|
{
|
||||||
|
#pragma omp masked
|
||||||
|
v = x + y;
|
||||||
|
} ();
|
||||||
|
}
|
Loading…
Reference in New Issue