aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2015-03-19 19:12:43 +0000
committerJakub Jelinek <jakub@redhat.com>2015-03-19 19:12:43 +0000
commitc97b1f93a3237816022f34d3f542a47d3ce848db (patch)
treef0b46bd92e908bd774e4726f1c69ec6676f54ea5 /libgomp/testsuite/libgomp.c
parent3ba6fe2cb9c52f5526b2ae0f61a5228dc1df47d0 (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: https://gcc.gnu.org/svn/gcc/trunk@221520 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/testsuite/libgomp.c')
-rw-r--r--libgomp/testsuite/libgomp.c/target-10.c14
1 files changed, 14 insertions, 0 deletions
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;
+}