On 21/03/2025 20:17, Sandra Loosemore wrote:
Does the attached patch reflect what you have in mind?
diff --git libgomp/libgomp_g.h libgomp/libgomp_g.h
index 8993ec610fb..274f4937680 100644
--- libgomp/libgomp_g.h
+++ libgomp/libgomp_g.h
@@ -359,9 +359,10 @@ extern void GOMP_teams (unsigned int, unsigned int);
extern bool GOMP_teams4 (unsigned int, unsigned int, unsigned int,
bool);
extern void *GOMP_target_map_indirect_ptr (void *);
struct interop_obj_t;
-extern void GOMP_interop (int, int, struct interop_obj_t ***, const
int *,
- const char **, int, struct interop_obj_t **, int,
- struct interop_obj_t ***, unsigned, void **);
+extern void GOMP_interop (int, int, struct interop_obj_t **const *,
const int *,
+ const char *const *, int, struct interop_obj_t **,
+ int, struct interop_obj_t **const *, unsigned,
+ void **);
/* teams.c */
diff --git libgomp/target.c libgomp/target.c
index 36ed797b0a9..54c244e0f13 100644
--- libgomp/target.c
+++ libgomp/target.c
@@ -5279,11 +5279,11 @@ ialias (omp_get_interop_rc_desc)
struct interop_data_t
{
int device_num, n_init, n_use, n_destroy;
- struct interop_obj_t ***init;
+ struct interop_obj_t **const *init;
struct interop_obj_t **use;
- struct interop_obj_t ***destroy;
+ struct interop_obj_t **const *destroy;
const int *target_targetsync;
- const char **prefer_type;
+ const char *const *prefer_type;
};
static void
@@ -5348,10 +5348,10 @@ gomp_interop_internal (void *data)
'flags' is used for the 'nowait' clause. */
void
-GOMP_interop (int device_num, int n_init, struct interop_obj_t ***init,
- const int *target_targetsync, const char **prefer_type, int
n_use,
- struct interop_obj_t **use, int n_destroy,
- struct interop_obj_t ***destroy, unsigned int flags,
+GOMP_interop (int device_num, int n_init, struct interop_obj_t
**const *init,
+ const int *target_targetsync, const char *const *prefer_type,
+ int n_use, struct interop_obj_t **use, int n_destroy,
+ struct interop_obj_t **const *destroy, unsigned int flags,
void **depend)
{
struct interop_data_t args;