public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-5061] Restore 'GOMP_OPENACC_DIM' environment variable parsing
Date: Tue,  9 Nov 2021 16:03:47 +0000 (GMT)	[thread overview]
Message-ID: <20211109160347.0C5A03858C3A@sourceware.org> (raw)

https://gcc.gnu.org/g:00c9ce13a64e324dabd8dfd236882919a3119479

commit r12-5061-g00c9ce13a64e324dabd8dfd236882919a3119479
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Fri Nov 5 14:42:21 2021 +0100

    Restore 'GOMP_OPENACC_DIM' environment variable parsing
    
    ... 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.

Diff:
---
 libgomp/env.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgomp/env.c b/libgomp/env.c
index df10ff656b6..75018e8c252 100644
--- a/libgomp/env.c
+++ b/libgomp/env.c
@@ -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;


                 reply	other threads:[~2021-11-09 16:03 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=20211109160347.0C5A03858C3A@sourceware.org \
    --to=tschwinge@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: link
Be 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).