Restore 'GOMP_OPENACC_DIM' environment variable parsing
authorThomas Schwinge <thomas@codesourcery.com>
Fri, 5 Nov 2021 13:42:21 +0000 (14:42 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 9 Nov 2021 15:51:57 +0000 (16:51 +0100)
... that got broken by recent commit c057ed9c52c6a63a1a692268f916b1a9131cd4b7
"openmp: Fix up strtoul and strtoull uses in libgomp", resulting in spurious
FAILs for tests specifying 'dg-set-target-env-var "GOMP_OPENACC_DIM" "[...]"'.

libgomp/
* env.c (parse_gomp_openacc_dim): Restore parsing.

libgomp/env.c

index df10ff6..75018e8 100644 (file)
@@ -1243,7 +1243,7 @@ parse_gomp_openacc_dim (void)
 
       errno = 0;
       val = strtol (pos, &eptr, 10);
-      if (errno || eptr != pos || val < 0 || (unsigned)val != val)
+      if (errno || eptr == pos || val < 0 || (unsigned)val != val)
        break;
 
       goacc_default_dims[i] = (int)val;