aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTobias Burnus <tburnus@baylibre.com>2024-09-13 16:48:57 +0200
committerTobias Burnus <tburnus@baylibre.com>2024-09-13 16:48:57 +0200
commit99988464fc86354f0359c0fd91eee444fb5bd8a2 (patch)
tree7077436e7a92d198838ca9006a40032a6b8229c3 /include
parent508ef585243d4674d06b0737bfe8769fc18f824f (diff)
downloadgcc-99988464fc86354f0359c0fd91eee444fb5bd8a2.zip
gcc-99988464fc86354f0359c0fd91eee444fb5bd8a2.tar.gz
gcc-99988464fc86354f0359c0fd91eee444fb5bd8a2.tar.bz2
Fortran: Fixes to OpenMP 'interop' directive parsing support
Handle lists as argument to 'fr' and 'attr'; fix parsing corner cases. Additionally, 'fr' values are now internally stored as integer, permitting the diagnoses (warning) for values not defined in the OpenMP additional definitions document. PR fortran/116661 gcc/fortran/ChangeLog: * gfortran.h (gfc_omp_namelist): Rename 'init' members for clarity. * match.cc (gfc_free_omp_namelist): Handle renaming. * dump-parse-tree.cc (show_omp_namelist): Update for new format and features. * openmp.cc (gfc_match_omp_prefer_type): Parse list to 'fr' and 'attr'; store 'fr' values as integer. (gfc_match_omp_init): Rename variable names. gcc/ChangeLog: * omp-api.h (omp_get_fr_id_from_name, omp_get_name_from_fr_id): New prototypes. * omp-general.cc (omp_get_fr_id_from_name, omp_get_name_from_fr_id): New. include/ChangeLog: * gomp-constants.h (GOMP_INTEROP_IFR_LAST, GOMP_INTEROP_IFR_SEPARATOR, GOMP_INTEROP_IFR_NONE): New. gcc/testsuite/ChangeLog: * gfortran.dg/gomp/interop-1.f90: Extend, update dg-*. * gfortran.dg/gomp/interop-2.f90: Update dg-error. * gfortran.dg/gomp/interop-3.f90: Add dg-warning.
Diffstat (limited to 'include')
-rw-r--r--include/gomp-constants.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/gomp-constants.h b/include/gomp-constants.h
index 775fc4e..0fae337 100644
--- a/include/gomp-constants.h
+++ b/include/gomp-constants.h
@@ -388,6 +388,11 @@ enum gomp_map_kind
#define GOMP_REQUIRES_REVERSE_OFFLOAD 0x80
#define GOMP_REQUIRES_TARGET_USED 0x200
+/* Interop foreign-runtime data. */
+#define GOMP_INTEROP_IFR_LAST 7
+#define GOMP_INTEROP_IFR_SEPARATOR -1
+#define GOMP_INTEROP_IFR_NONE -2
+
/* HSA specific data structures. */
/* Identifiers of device-specific target arguments. */