https://gcc.gnu.org/g:7c307d614570ec4222e091e5f5a66b998f8f5025

commit 7c307d614570ec4222e091e5f5a66b998f8f5025
Author: Tobias Burnus <tbur...@baylibre.com>
Date:   Mon Jan 27 12:48:30 2025 +0100

    OpenMP: Add 'nec' as to the 'vendor' context-selector list
    
    For unknown vendors using in a context selector such as
       match(implementation={vendor(...)})
    GCC prints a warning like:
       warning: unknown property 'nec' of 'vendor' selector
    
    While all known vendors (including the vendor 'unknown') are silently
    accepted, only "gnu" counts as matched by GCC.
    
    The list of known vendors is published in OpenMP's additional
    definition document (or, previously, the context definitions document).
    While the initial list did not contain 'nec', it was added quite early
    but GCC missed this addition, which this commit rectifies.
    
    Some history:
    * GCC added the list in r10-3744-g94e7f906ca5c73 (Oct 2019)
    * At spec level, 'pgi' was replaced by 'nvidia' in Nov 2019, but
      GCC (since r10-4639-gd0ec7c935f0c96, Nov 2019) and LLVM recognize
      both vendor names.
    * 'nec' was then added in Dec 2019 and is present in
      "Context Definitions for the OpenMP API Specification Version 5.0
      – Version 1.0", but only this commit adds it.
    * 'hpe' (as alias for 'cray') was added to the spec in Nov 2020 but
      to GCC only in r14-6720-gd0603dfe9d3bc7 (Dec 2023).
    
    gcc/
            * omp-general.cc (vendor_properties): Add "nec".
    
    (cherry picked from commit a104766914e98ded9b991f1dac9ad22e815a3acc)

Diff:
---
 gcc/ChangeLog.omp  | 7 +++++++
 gcc/omp-general.cc | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp
index 36e1767e841e..00f00b7af479 100644
--- a/gcc/ChangeLog.omp
+++ b/gcc/ChangeLog.omp
@@ -1,3 +1,10 @@
+2025-01-27  Tobias Burnus  <tbur...@baylibre.com>
+
+       Backported from master:
+       2024-12-19  Tobias Burnus  <tbur...@baylibre.com>
+
+       * omp-general.cc (vendor_properties): Add "nec".
+
 2025-01-27  Tobias Burnus  <tbur...@baylibre.com>
 
        Backported from master:
diff --git a/gcc/omp-general.cc b/gcc/omp-general.cc
index ec76efa04315..4713aca1c657 100644
--- a/gcc/omp-general.cc
+++ b/gcc/omp-general.cc
@@ -1169,7 +1169,7 @@ static const char *const kind_properties[] =
   { "host", "nohost", "cpu", "gpu", "fpga", "any", NULL };
 static const char *const vendor_properties[] =
   { "amd", "arm", "bsc", "cray", "fujitsu", "gnu", "hpe", "ibm", "intel",
-    "llvm", "nvidia", "pgi", "ti", "unknown", NULL };
+    "llvm", "nec", "nvidia", "pgi", "ti", "unknown", NULL };
 static const char *const extension_properties[] =
   { NULL };
 static const char *const atomic_default_mem_order_properties[] =

Reply via email to