diff options
author | Kwok Cheung Yeung <kcyeung@baylibre.com> | 2024-02-15 20:59:39 +0000 |
---|---|---|
committer | Kwok Cheung Yeung <kcyeung@baylibre.com> | 2024-02-15 21:04:53 +0000 |
commit | 451bb5866021cc854cd972396c6bc4923eb14d39 (patch) | |
tree | 25eed3b7bd77d7ce4eb6d9d71468ca95d1c14887 /libgm2 | |
parent | 617bd59c659dcf6e5391409a2e9f64f75e905a96 (diff) | |
download | gcc-451bb5866021cc854cd972396c6bc4923eb14d39.zip gcc-451bb5866021cc854cd972396c6bc4923eb14d39.tar.gz gcc-451bb5866021cc854cd972396c6bc4923eb14d39.tar.bz2 |
openmp, fortran: Add Fortran support for indirect clause on the declare target directive
2024-02-15 Kwok Cheung Yeung <kcyeung@baylibre.com>
gcc/fortran/
* dump-parse-tree.cc (show_attr): Handle omp_declare_target_indirect
attribute.
* f95-lang.cc (gfc_gnu_attributes): Add entry for 'omp declare
target indirect'.
* gfortran.h (symbol_attribute): Add omp_declare_target_indirect
field.
(struct gfc_omp_clauses): Add indirect field.
* openmp.cc (omp_mask2): Add OMP_CLAUSE_INDIRECT.
(gfc_match_omp_clauses): Match indirect clause.
(OMP_DECLARE_TARGET_CLAUSES): Add OMP_CLAUSE_INDIRECT.
(gfc_match_omp_declare_target): Check omp_device_type and apply
omp_declare_target_indirect attribute to symbol if indirect clause
active. Show warning if there are only device_type and/or indirect
clauses on the directive.
* trans-decl.cc (add_attributes_to_decl): Add 'omp declare target
indirect' attribute if symbol has indirect attribute set.
gcc/testsuite/
* gfortran.dg/gomp/declare-target-4.f90 (f1): Update expected warning.
* gfortran.dg/gomp/declare-target-indirect-1.f90: New.
* gfortran.dg/gomp/declare-target-indirect-2.f90: New.
libgomp/
* testsuite/libgomp.fortran/declare-target-indirect-1.f90: New.
* testsuite/libgomp.fortran/declare-target-indirect-2.f90: New.
* testsuite/libgomp.fortran/declare-target-indirect-3.f90: New.
Diffstat (limited to 'libgm2')
0 files changed, 0 insertions, 0 deletions