public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-2559] libgomp: Fix up OMP_PROC_BIND handling [PR106894]
@ 2022-09-09 11:47 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2022-09-09 11:47 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:26a1f4fcb264d110708483815c8c8d7bb4ff6788

commit r13-2559-g26a1f4fcb264d110708483815c8c8d7bb4ff6788
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Sep 9 13:43:43 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.

Diff:
---
 libgomp/env.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

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 11:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-09 11:47 [gcc r13-2559] libgomp: Fix up OMP_PROC_BIND handling [PR106894] Jakub Jelinek

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).