From: Jakub Jelinek Date: Thu, 14 Nov 2019 08:13:01 +0000 (+0100) Subject: c-omp.c (c_omp_check_context_selector): Add nvidia to the list of valid vendors. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d0ec7c935f0c961b13f75c906b8621e35ce1ace5;p=gcc.git c-omp.c (c_omp_check_context_selector): Add nvidia to the list of valid vendors. * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of valid vendors. * c-c++-common/gomp/declare-variant-3.c: Add testcase for vendor nvidia. From-SVN: r278203 --- diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 682355d4454..336159d79f6 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,5 +1,8 @@ 2019-11-14 Jakub Jelinek + * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of + valid vendors. + * c-omp.c (c_omp_check_context_selector): Handle name lists containing string literals. Don't diagnose atomic_default_mem_order with multiple props. diff --git a/gcc/c-family/c-omp.c b/gcc/c-family/c-omp.c index 7d8eb322482..a4be2d68b9a 100644 --- a/gcc/c-family/c-omp.c +++ b/gcc/c-family/c-omp.c @@ -2173,7 +2173,7 @@ c_omp_check_context_selector (location_t loc, tree ctx) "host", "nohost", "cpu", "gpu", "fpga", "any", NULL }; static const char *const vendor[] = { "amd", "arm", "bsc", "cray", "fujitsu", "gnu", "ibm", "intel", - "llvm", "pgi", "ti", "unknown", NULL }; + "llvm", "nvidia", "pgi", "ti", "unknown", NULL }; static const char *const extension[] = { NULL }; static const char *const atomic_default_mem_order[] = { "seq_cst", "relaxed", "acq_rel", NULL }; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2b32bd28f38..fa87ca7c3c7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,7 @@ 2019-11-14 Jakub Jelinek + * c-c++-common/gomp/declare-variant-3.c: Add testcase for vendor nvidia. + * c-c++-common/gomp/declare-variant-2.c: Adjust expected diagnostics, add a test for atomic_default_mem_order with a string literal. * c-c++-common/gomp/declare-variant-3.c: Use string literal props diff --git a/gcc/testsuite/c-c++-common/gomp/declare-variant-3.c b/gcc/testsuite/c-c++-common/gomp/declare-variant-3.c index e1c37a0b422..d0800ff2b04 100644 --- a/gcc/testsuite/c-c++-common/gomp/declare-variant-3.c +++ b/gcc/testsuite/c-c++-common/gomp/declare-variant-3.c @@ -145,3 +145,5 @@ void f75 (void); void f76 (void); #pragma omp declare variant (f13) match (device={kind("any",any)}) void f77 (void); +#pragma omp declare variant (f13) match (implementation={vendor(nvidia)}) +void f78 (void);