* [SH][committed] Fix PR 80672
@ 2019-09-28 8:44 Oleg Endo
0 siblings, 0 replies; only message in thread
From: Oleg Endo @ 2019-09-28 8:44 UTC (permalink / raw)
To: gcc-patches
[-- 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 ());
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-28 8:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-28 8:44 [SH][committed] Fix PR 80672 Oleg Endo
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).