From: Oleg Endo <oleg.endo@t-online.de>
To: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: [SH][committed] Fix PR 80672
Date: Sat, 28 Sep 2019 08:44:00 -0000 [thread overview]
Message-ID: <d992124cf3f53543653d7a478378ff6e528b7f23.camel@t-online.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 414 bytes --]
Hi,
The attached patch fixes PR 80672.
Tested by building the compiler with "make all-gcc" and manually
invoking it and checking that the option is parsed as expected.
Committed to trunk as r276240, GCC 9 as r276241, GCC 8 as r276242, GCC
7 as r276243.
Cheers,
Oleg
gcc/ChangeLog
PR target/80672
* config/sh/sh.c (parse_validate_atomic_model_option): Use
std::string::compare instead of std::string::find.
[-- Attachment #2: sh_pr80672.patch --]
[-- Type: text/x-patch, Size: 529 bytes --]
Index: gcc/config/sh/sh.c
===================================================================
--- gcc/config/sh/sh.c (revision 276235)
+++ gcc/config/sh/sh.c (working copy)
@@ -734,7 +734,7 @@
{
if (tokens[i] == "strict")
ret.strict = true;
- else if (tokens[i].find ("gbr-offset=") == 0)
+ else if (!tokens[i].compare (0, strlen ("gbr-offset="), "gbr-offset="))
{
std::string offset_str = tokens[i].substr (strlen ("gbr-offset="));
ret.tcb_gbr_offset = integral_argument (offset_str.c_str ());
reply other threads:[~2019-09-28 8:44 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=d992124cf3f53543653d7a478378ff6e528b7f23.camel@t-online.de \
--to=oleg.endo@t-online.de \
--cc=gcc-patches@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).