public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-5446] openmp: Handle OMP_MASKED in potential_constant_expression_1 [PR103349] Date: Mon, 22 Nov 2021 09:14:34 +0000 (GMT) [thread overview] Message-ID: <20211122091434.DCDC03858406@sourceware.org> (raw) https://gcc.gnu.org/g:4b1e14346a08554dc33f71fca980578a7a3e38a2 commit r12-5446-g4b1e14346a08554dc33f71fca980578a7a3e38a2 Author: Jakub Jelinek <jakub@redhat.com> Date: Mon Nov 22 10:13:24 2021 +0100 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. Diff: --- gcc/cp/constexpr.c | 1 + gcc/testsuite/g++.dg/gomp/masked-1.C | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index c8f9d5fa133..d66a56583ae 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -8686,6 +8686,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, case OMP_SINGLE: case OMP_SECTION: case OMP_MASTER: + case OMP_MASKED: case OMP_TASKGROUP: case OMP_TARGET_UPDATE: case OMP_TARGET_ENTER_DATA: diff --git a/gcc/testsuite/g++.dg/gomp/masked-1.C b/gcc/testsuite/g++.dg/gomp/masked-1.C new file mode 100644 index 00000000000..1ea4a13fa23 --- /dev/null +++ b/gcc/testsuite/g++.dg/gomp/masked-1.C @@ -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; + } (); +}
reply other threads:[~2021-11-22 9:14 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211122091434.DCDC03858406@sourceware.org \ --to=jakub@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).