]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
OpenMP: Add 'nec' as to the 'vendor' context-selector list
authorTobias Burnus <tburnus@baylibre.com>
Thu, 19 Dec 2024 16:27:41 +0000 (17:27 +0100)
committerTobias Burnus <tburnus@baylibre.com>
Thu, 19 Dec 2024 16:35:48 +0000 (17:35 +0100)
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".

gcc/omp-general.cc

index 9837ca021f0d4a635445af94d9fade5de7f18862..78c38a6d71528a576bf4215f2065c2dca7e4b1b3 100644 (file)
@@ -1163,7 +1163,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[] =