c-parser.c (c_parser_omp_context_selector): Don't require score argument to fit into...
authorJakub Jelinek <jakub@redhat.com>
Thu, 14 Nov 2019 08:14:16 +0000 (09:14 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 14 Nov 2019 08:14:16 +0000 (09:14 +0100)
commitbedb7f045f3bc4ccf17f4b58f840c93acb821a3f
treefcccc411bdf6e64e0876f3eeeb76ff8b773b0243
parentd0ec7c935f0c961b13f75c906b8621e35ce1ace5
c-parser.c (c_parser_omp_context_selector): Don't require score argument to fit into shwi, just to be INTEGER_CST.

* c-parser.c (c_parser_omp_context_selector): Don't require score
argument to fit into shwi, just to be INTEGER_CST.  Diagnose
negative score.

* parser.c (cp_parser_omp_context_selector): Don't require score
argument to fit into shwi, just to be INTEGER_CST.  Diagnose
negative score.
* pt.c (tsubst_attribute): Likewise.

* c-c++-common/gomp/declare-variant-2.c: Add test for non-integral
score and for negative score.
* c-c++-common/gomp/declare-variant-3.c: Add test for zero score.
* g++.dg/gomp/declare-variant-8.C: Add test for negative and zero
scores.

From-SVN: r278204
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/gomp/declare-variant-2.c
gcc/testsuite/c-c++-common/gomp/declare-variant-3.c
gcc/testsuite/g++.dg/gomp/declare-variant-8.C