diff options
Diffstat (limited to 'gcc/varpool.c')
-rw-r--r-- | gcc/varpool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/varpool.c b/gcc/varpool.c index 78969d28c1c..71fb4b88df1 100644 --- a/gcc/varpool.c +++ b/gcc/varpool.c @@ -149,11 +149,11 @@ varpool_node::get_create (tree decl) node = varpool_node::create_empty (); node->decl = decl; - if ((flag_openacc || flag_openmp) && !DECL_EXTERNAL (decl) + if ((flag_openacc || flag_openmp) && lookup_attribute ("omp declare target", DECL_ATTRIBUTES (decl))) { node->offloadable = 1; - if (ENABLE_OFFLOADING) + if (ENABLE_OFFLOADING && !DECL_EXTERNAL (decl)) { g->have_offload = true; if (!in_lto_p) |