aboutsummaryrefslogtreecommitdiff
path: root/gcc/varpool.c
diff options
context:
space:
mode:
authorIlya Verbin <ilya.verbin@intel.com>2015-03-13 13:30:26 +0000
committerIlya Verbin <iverbin@gcc.gnu.org>2015-03-13 13:30:26 +0000
commitdb397e2e5a10965e953ce1801511c55fe8042295 (patch)
treef625bcbcacaa7aca60c5598632cbd58e1847f345 /gcc/varpool.c
parentd3ef4bd61fdcc491c39249dd256c3733f45219b9 (diff)
downloadgcc-db397e2e5a10965e953ce1801511c55fe8042295.zip
gcc-db397e2e5a10965e953ce1801511c55fe8042295.tar.gz
gcc-db397e2e5a10965e953ce1801511c55fe8042295.tar.bz2
varpool.c (varpool_node::get_create): Don't set 'offloadable' flag for the external decls.
gcc/ * varpool.c (varpool_node::get_create): Don't set 'offloadable' flag for the external decls. libgomp/ * testsuite/libgomp.fortran/declare-target-1.f90: New test. * testsuite/libgomp.fortran/declare-target-2.f90: New file. From-SVN: r221421
Diffstat (limited to 'gcc/varpool.c')
-rw-r--r--gcc/varpool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/varpool.c b/gcc/varpool.c
index b583693..ce64279 100644
--- a/gcc/varpool.c
+++ b/gcc/varpool.c
@@ -173,7 +173,7 @@ varpool_node::get_create (tree decl)
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;