public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/omp/gcc-12] libgomp: Fix up OMP_PROC_BIND handling [PR106894]
@ 2022-09-09 13:37 Tobias Burnus
0 siblings, 0 replies; only message in thread
From: Tobias Burnus @ 2022-09-09 13:37 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:1aa03128944dad6b3ad094b1320ed950f62d9cd7
commit 1aa03128944dad6b3ad094b1320ed950f62d9cd7
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Sep 9 15:35:18 2022 +0200
libgomp: Fix up OMP_PROC_BIND handling [PR106894]
While the first param is char (gomp_global_icv.bind_var), the second param
is char * (gomp_bind_var_list), so we shouldn't access it through *(char *).
2022-09-09 Jakub Jelinek <jakub@redhat.com>
PR libgomp/106894
* env.c (initialize_env) <case PARSE_BIND>: Use char ** instead of
char * for dest[1] initialization from params[1]. Formatting fixes.
(cherry picked from commit 26a1f4fcb264d110708483815c8c8d7bb4ff6788)
Diff:
---
libgomp/ChangeLog.omp | 9 +++++++++
libgomp/env.c | 8 +++-----
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp
index 5779390952f..df32c355610 100644
--- a/libgomp/ChangeLog.omp
+++ b/libgomp/ChangeLog.omp
@@ -1,3 +1,12 @@
+2022-09-09 Tobias Burnus <tobias@codesourcery.com>
+
+ Backport from mainline:
+ 2022-09-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR libgomp/106894
+ * env.c (initialize_env) <case PARSE_BIND>: Use char ** instead of
+ char * for dest[1] initialization from params[1]. Formatting fixes.
+
2022-09-09 Tobias Burnus <tobias@codesourcery.com>
Backport from mainline:
diff --git a/libgomp/env.c b/libgomp/env.c
index 82e22ac789f..92f32f72020 100644
--- a/libgomp/env.c
+++ b/libgomp/env.c
@@ -2184,12 +2184,10 @@ initialize_env (void)
*(int *) (host_envvars[omp_var].dest[1]) = *(int *) params[1];
break;
case PARSE_BIND:
- *(char *) (host_envvars[omp_var].dest[0])
- = *(char *) params[0];
- *(char *) (host_envvars[omp_var].dest[1])
- = *(char *) params[1];
+ *(char *) (host_envvars[omp_var].dest[0]) = *(char *) params[0];
+ *(char **) (host_envvars[omp_var].dest[1]) = *(char **) params[1];
*(unsigned long *) (host_envvars[omp_var].dest[2])
- = *(unsigned long *) params[2];
+ = *(unsigned long *) params[2];
break;
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-09 13:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-09 13:37 [gcc/devel/omp/gcc-12] libgomp: Fix up OMP_PROC_BIND handling [PR106894] Tobias Burnus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).