]> git.ipfire.org Git - thirdparty/gcc.git/commit
c-family/
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 12 Oct 2019 08:27:36 +0000 (08:27 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 12 Oct 2019 08:27:36 +0000 (08:27 +0000)
commit2fa15104721735e0e3524fde7c487db77c352dfe
tree302f44f3d609ab83db0ef9a7e4ec5aeb4287965e
parent474da2e9b995a72fc05cdc89b9fe384861c761e5
c-family/
* c-common.h (c_omp_mark_declare_variant,
c_omp_context_selector_matches): Declare.
* c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
and hsa-common.h.
(c_omp_get_context_selector): Support second argument NULL.
(c_omp_mark_declare_variant, c_omp_context_selector_matches): New
functions.
* c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
attribute, add "omp declare variant base" and
"omp declare variant variant" attributes.
c/
* c-parser.c (c_parser_omp_context_selector): Improve error recovery.
For simd properties, put them directly into TREE_VALUE.
(c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
If c_omp_context_selector_matches is 0, don't add attribute, otherwise
add "omp declare variant base" attribute rather than
"omp declare variant".
cp/
* parser.c (cp_parser_omp_context_selector): Improve error recovery.
For simd properties, put them directly into TREE_VALUE.
(cp_finish_omp_declare_variant): Add "omp declare variant base"
attribute rather than "omp declare variant".
testsuite/
* c-c++-common/gomp/declare-variant-2.c: Adjust for error recovery
improvements.  Add new tests.
* c-c++-common/gomp/declare-variant-4.c: New test.
* c-c++-common/gomp/declare-variant-5.c: New test.
* c-c++-common/gomp/declare-variant-6.c: New test.
* c-c++-common/gomp/declare-variant-7.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276914 138bc75d-0d04-0410-961f-82ee72b054a4
14 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/testsuite/ChangeLog
gcc/testsuite/c-c++-common/gomp/declare-variant-2.c
gcc/testsuite/c-c++-common/gomp/declare-variant-4.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/gomp/declare-variant-5.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/gomp/declare-variant-6.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/gomp/declare-variant-7.c [new file with mode: 0644]