aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.cc
diff options
context:
space:
mode:
authorTobias Burnus <tburnus@baylibre.com>2024-07-29 11:46:57 +0200
committerTobias Burnus <tburnus@baylibre.com>2024-07-29 11:46:57 +0200
commit29b1587e7d34667a1fd63071c1e4f5475cd71026 (patch)
treeae397d08eea21d4bd0712ee9c90d496d55e701da /gcc/tree-vectorizer.cc
parent14c47e7eb06e8b95913794f6059560fc2fa6de91 (diff)
downloadgcc-29b1587e7d34667a1fd63071c1e4f5475cd71026.zip
gcc-29b1587e7d34667a1fd63071c1e4f5475cd71026.tar.gz
gcc-29b1587e7d34667a1fd63071c1e4f5475cd71026.tar.bz2
OpenMP/Fortran: Fix handling of 'declare target' with 'link' clause [PR115559]
Contrary to a normal 'declare target', the 'declare target link' attribute also needs to set node->offloadable and push the offload_vars in the front end. Linked variables require that the data is mapped. For module variables, this can happen anywhere. For variables in an external subprograms or the main programm, this can only happen in the either that program itself or in an internal subprogram. - Whether a variable is just normally mapped or linked then becomes relevant if a device routine exists that can access that variable, i.e. an internal procedure has then to be marked as declare target. PR fortran/115559 gcc/fortran/ChangeLog: * trans-common.cc (build_common_decl): Add 'omp declare target' and 'omp declare target link' variables to offload_vars. * trans-decl.cc (add_attributes_to_decl): Likewise; update args and call decl_attributes. (get_proc_pointer_decl, gfc_get_extern_function_decl, build_function_decl): Update calls. (gfc_get_symbol_decl): Likewise; move after 'DECL_STATIC (t)=1' to avoid errors with symtab_node::get_create. libgomp/ChangeLog: * testsuite/libgomp.fortran/declare-target-link.f90: New test.
Diffstat (limited to 'gcc/tree-vectorizer.cc')
0 files changed, 0 insertions, 0 deletions