gcc/libgomp/testsuite/libgomp.c/target-10.c
Jakub Jelinek 9b65e171ed c-decl.c (c_decl_attributes): Also add "omp declare target" attribute for DECL_EXTERNAL VAR_DECLs.
* 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.

From-SVN: r221520
2015-03-19 20:12:43 +01:00

15 lines
164 B
C

/* { 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;
}