c-common.h (c_omp_check_context_selector, [...]): Declare.
authorJakub Jelinek <jakub@redhat.com>
Thu, 10 Oct 2019 07:07:30 +0000 (09:07 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 10 Oct 2019 07:07:30 +0000 (09:07 +0200)
commit94e7f906ca5c73fb79d21ec54733e9e75a96c2b4
tree5f686002d13f0905df1681a9408a9d96b23ee258
parent6ea20bd0218fd6386cef3701befa653cee6f1101
c-common.h (c_omp_check_context_selector, [...]): Declare.

c-family/
* c-common.h (c_omp_check_context_selector,
c_omp_get_context_selector): Declare.
* c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
in diagnostic message.
(c_omp_check_context_selector, c_omp_get_context_selector): New
functions.
* c-attribs.c (c_common_attribute_table): Add "omp declare variant"
attribute.
(handle_omp_declare_variant_attribute): New function.
c/
* c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
true, terminate processing on closing paren and don't skip to end of
pragma line.
(c_parser_omp_declare_simd): Handle also declare variant.
(omp_construct_selectors, omp_device_selectors,
omp_implementation_selectors, omp_user_selectors): New variables.
(c_parser_omp_context_selector,
c_parser_omp_context_selector_specification,
c_finish_omp_declare_variant): New functions.
(c_finish_omp_declare_simd): Handle both declare simd and
declare variant.
(c_parser_omp_declare): Handle declare variant.
cp/
* parser.h (struct cp_omp_declare_simd_data): Add variant_p member.
* parser.c (cp_ensure_no_omp_declare_simd): Handle both declare simd
and declare variant.
(cp_parser_oacc_all_clauses): Formatting fix.
(cp_parser_omp_all_clauses): Add NESTED_P argument, if true, terminate
processing on closing paren and don't skip to end of pragma line.
(cp_parser_omp_declare_simd): Add VARIANT_P argument.  Handle also
declare variant.
(omp_construct_selectors, omp_device_selectors,
omp_implementation_selectors, omp_user_selectors): New variables.
(cp_parser_omp_context_selector,
cp_parser_omp_context_selector_specification,
cp_finish_omp_declare_variant): New functions.
(cp_parser_late_parsing_omp_declare_simd): Handle also declare variant.
(cp_parser_omp_declare): Handle declare variant.
testsuite/
* c-c++-common/gomp/declare-variant-1.c: New test.
* c-c++-common/gomp/declare-variant-2.c: New test.
* c-c++-common/gomp/declare-variant-3.c: New test.
* g++.dg/gomp/this-1.C: Adjust for diagnostic message spelling fix.
* gcc.dg/gomp/declare-variant-1.c: New test.
* gcc.dg/gomp/declare-variant-2.c: New test.

From-SVN: r276789
16 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c-attribs.c
gcc/c-family/c-common.h
gcc/c-family/c-omp.c
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/cp/parser.h
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/gomp/declare-variant-1.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/gomp/declare-variant-2.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/gomp/declare-variant-3.c [new file with mode: 0644]
gcc/testsuite/g++.dg/gomp/this-1.C
gcc/testsuite/gcc.dg/gomp/declare-variant-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/gomp/declare-variant-2.c [new file with mode: 0644]