This group of patches are for some lingering problems with
metadirective, which was a relatively late addition to GCC 15.  The
first two address ICE-after-invalid problems in the C and C++ front
ends, and I think are suitable for backport to the GCC 15 branch as
well as trunk.  The third patch addresses a missed-optimization
situation and adds new functionality to the user/condition selector;
the OpenMP spec is rather vague on this so it's not clear to me if the
existing behavior is a bug or not, but apparently some external testsuites
do depend on implicit conversion of pointer to bool here, which is
rejected without this patch (and triggers the ICE fixed by part 2).

OK for trunk, at least?

Sandra Loosemore (3):
  OpenMP: Fix ICE in metadirective recovery after error [PR120180]
  OpenMP: Fix ICE and other issues in C/C++ metadirective error
    recovery.
  OpenMP: Handle more cases in user/condition selector

 gcc/c/c-parser.cc                             | 106 +++++++++++++-----
 gcc/cp/parser.cc                              |  25 +++--
 gcc/cp/pt.cc                                  |  23 ++--
 .../c-c++-common/gomp/declare-variant-2.c     |  15 ++-
 .../gomp/metadirective-condition-constexpr.c  |  13 +++
 .../gomp/metadirective-condition.c            |  25 +++++
 .../gomp/metadirective-error-recovery.c       |  25 +++++
 gcc/testsuite/c-c++-common/gomp/pr120180.c    |  22 ++++
 .../gomp/metadirective-condition-class.C      |  43 +++++++
 9 files changed, 245 insertions(+), 52 deletions(-)
 create mode 100644 
gcc/testsuite/c-c++-common/gomp/metadirective-condition-constexpr.c
 create mode 100644 gcc/testsuite/c-c++-common/gomp/metadirective-condition.c
 create mode 100644 
gcc/testsuite/c-c++-common/gomp/metadirective-error-recovery.c
 create mode 100644 gcc/testsuite/c-c++-common/gomp/pr120180.c
 create mode 100644 gcc/testsuite/g++.dg/gomp/metadirective-condition-class.C

-- 
2.34.1

Reply via email to