diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-03-19 19:12:43 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-03-19 19:12:43 +0000 |
commit | 1443772f3685beada7aae669875933cb3e8edcde (patch) | |
tree | f0b46bd92e908bd774e4726f1c69ec6676f54ea5 /libgomp | |
parent | bfdab17df4826ec7cb9874e1e8962e866e5aaeb5 (diff) |
* c-decl.c (c_decl_attributes): Also add "omp declare target"
attribute for DECL_EXTERNAL VAR_DECLs.
* decl2.c (cplus_decl_attributes): Also add "omp declare target"
attribute for DECL_EXTERNAL VAR_DECLs.
* testsuite/libgomp.c/target-10.c: New test.
* testsuite/libgomp.c++/target-4.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221520 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 5 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c++/target-4.C | 3 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/target-10.c | 14 |
3 files changed, 22 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index d6213210507..d1514733c43 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,8 @@ +2015-03-19 Jakub Jelinek <jakub@redhat.com> + + * testsuite/libgomp.c/target-10.c: New test. + * testsuite/libgomp.c++/target-4.C: New test. + 2015-03-13 Ilya Verbin <ilya.verbin@intel.com> * testsuite/libgomp.fortran/declare-target-1.f90: New test. diff --git a/libgomp/testsuite/libgomp.c++/target-4.C b/libgomp/testsuite/libgomp.c++/target-4.C new file mode 100644 index 00000000000..9d1b576f977 --- /dev/null +++ b/libgomp/testsuite/libgomp.c++/target-4.C @@ -0,0 +1,3 @@ +// { dg-do run } + +#include "../libgomp.c/target-10.c" diff --git a/libgomp/testsuite/libgomp.c/target-10.c b/libgomp/testsuite/libgomp.c/target-10.c new file mode 100644 index 00000000000..bc66880b6af --- /dev/null +++ b/libgomp/testsuite/libgomp.c/target-10.c @@ -0,0 +1,14 @@ +/* { dg-do run } */ + +#pragma omp declare target +extern int v; +#pragma omp end declare target + +int v; + +int +main () +{ + #pragma omp target update to(v) + return 0; +} |