public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Tobias Burnus <burnus@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/omp/gcc-12] libgomp: Fix up OMP_PROC_BIND handling [PR106894] Date: Fri, 9 Sep 2022 13:37:46 +0000 (GMT) [thread overview] Message-ID: <20220909133746.36FD738582BF@sourceware.org> (raw) 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; } }
reply other threads:[~2022-09-09 13:37 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220909133746.36FD738582BF@sourceware.org \ --to=burnus@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).