* [committed] openmp: Handle OMP_MASKED in potential_constant_expression_1 [PR103349]
@ 2021-11-22 9:15 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2021-11-22 9:15 UTC (permalink / raw)
To: gcc-patches
Hi!
When adding OMP_MASKED, I apparently forgot to handle it in
potential_constant_expression_1, which means we can ICE on it.
Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
committed to trunk.
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.
--- gcc/cp/constexpr.c.jj 2021-11-18 12:33:22.014628184 +0100
+++ gcc/cp/constexpr.c 2021-11-21 20:56:15.138499377 +0100
@@ -8686,6 +8686,7 @@ potential_constant_expression_1 (tree t,
case OMP_SINGLE:
case OMP_SECTION:
case OMP_MASTER:
+ case OMP_MASKED:
case OMP_TASKGROUP:
case OMP_TARGET_UPDATE:
case OMP_TARGET_ENTER_DATA:
--- gcc/testsuite/g++.dg/gomp/masked-1.C.jj 2021-11-21 21:01:19.610215568 +0100
+++ gcc/testsuite/g++.dg/gomp/masked-1.C 2021-11-21 21:00:44.914703723 +0100
@@ -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;
+ } ();
+}
Jakub
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-22 9:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22 9:15 [committed] openmp: Handle OMP_MASKED in potential_constant_expression_1 [PR103349] Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).