+2015-03-13 Ilya Verbin <ilya.verbin@intel.com>
+
+ * varpool.c (varpool_node::get_create): Don't set 'offloadable' flag for
+ the external decls.
+
2015-03-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/64600
node = varpool_node::create_empty ();
node->decl = decl;
- if ((flag_openacc || flag_openmp)
+ if ((flag_openacc || flag_openmp) && !DECL_EXTERNAL (decl)
&& lookup_attribute ("omp declare target", DECL_ATTRIBUTES (decl)))
{
node->offloadable = 1;
+2015-03-13 Ilya Verbin <ilya.verbin@intel.com>
+
+ * testsuite/libgomp.fortran/declare-target-1.f90: New test.
+ * testsuite/libgomp.fortran/declare-target-2.f90: New file.
+
2015-03-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
* configure.tgt (*-*-rtems*): Use local-exec TLS model.
--- /dev/null
+! { dg-do run }
+! { dg-additional-sources declare-target-2.f90 }
+
+module declare_target_1_mod
+ integer :: var_x
+ !$omp declare target(var_x)
+end module declare_target_1_mod
+
+ interface
+ subroutine foo ()
+ end subroutine foo
+ end interface
+
+ call foo ()
+end
--- /dev/null
+! Don't compile this anywhere, it is just auxiliary
+! file compiled together with declare-target-1.f90
+! to verify inter-CU module handling of omp declare target.
+! { dg-do compile { target { lp64 && { ! lp64 } } } }
+
+subroutine foo
+ use declare_target_1_mod
+
+ var_x = 10
+ !$omp target update to(var_x)
+
+ !$omp target
+ var_x = var_x * 2;
+ !$omp end target
+
+ !$omp target update from(var_x)
+ if (var_x /= 20) call abort
+end subroutine foo