c-attribs.c (c_common_attribute_table): Add "omp declare target implicit" attribute.
authorJakub Jelinek <jakub@redhat.com>
Thu, 12 Jul 2018 19:36:01 +0000 (21:36 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 12 Jul 2018 19:36:01 +0000 (21:36 +0200)
commit9b4520336913e7015415fa921ea1de89ac98cfa9
tree211237062b7d9f8fe1a8f83048df1c6535b2bc5c
parentf34756291a6848f8eb6028a7a92808369ae8771b
c-attribs.c (c_common_attribute_table): Add "omp declare target implicit" attribute.

* c-attribs.c (c_common_attribute_table): Add
"omp declare target implicit" attribute.

* c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
type here, instead add "omp declare target implicit" attribute.
(finish_decl): Diagnose vars without mappable type here.

* decl2.c (cplus_decl_attributes): Don't diagnose vars without mappable
type here, instead add "omp declare target implicit" attribute.  Add
that attribute instead of "omp declare target" also when
processing_template_decl.
* decl.c (cp_finish_decl): Diagnose vars without mappable type here,
and before calling cp_omp_mappable_type call complete_type.

* c-c++-common/gomp/declare-target-3.c: New test.
* g++.dg/gomp/declare-target-2.C: New test.

From-SVN: r262605
gcc/c-family/ChangeLog
gcc/c-family/c-attribs.c
gcc/c/ChangeLog
gcc/c/c-decl.c
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/gomp/declare-target-3.c [new file with mode: 0644]
gcc/testsuite/g++.dg/gomp/declare-target-2.C [new file with mode: 0644]