]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Restore 'GOMP_OPENACC_DIM' environment variable parsing
authorThomas Schwinge <thomas@codesourcery.com>
Wed, 10 Nov 2021 07:49:34 +0000 (08:49 +0100)
committerTobias Burnus <tobias@codesourcery.com>
Wed, 10 Nov 2021 07:49:34 +0000 (08:49 +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.

(cherry picked from commit 00c9ce13a64e324dabd8dfd236882919a3119479)

libgomp/ChangeLog.omp
libgomp/env.c

index d0e4eb669730380e28d4cc1fa4622d191bce21d4..fb02f47701ef28364feddf19d5757c4818bdf699 100644 (file)
@@ -1,3 +1,10 @@
+2021-11-10  Tobias Burnus  <tobias@codesourcery.com>
+
+       Backported from master:
+       2021-11-09  Thomas Schwinge  <thomas@codesourcery.com>
+
+       * env.c (parse_gomp_openacc_dim): Restore parsing.
+
 2021-10-27  Tobias Burnus  <tobias@codesourcery.com>
 
        Backported from master:
index df10ff656b6bf598498f0186842999de54c4ca09..75018e8c2521c94b3637a30fdb0019765782c150 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;