From: "Roger Sayle" <roger@nextmovesoftware.com>
To: <gcc-patches@gcc.gnu.org>
Cc: "'Tamar Christina'" <Tamar.Christina@arm.com>
Subject: [PATCH] Fix bootstrap failure (with g++ 4.8.5) in tree-if-conv.cc.
Date: Fri, 14 Jul 2023 19:56:22 +0100 [thread overview]
Message-ID: <001201d9b684$e319fdd0$a94df970$@nextmovesoftware.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 381 bytes --]
This patch fixes the bootstrap failure I'm seeing using gcc 4.8.5 as
the host compiler. Ok for mainline? [I might be missing something]
2023-07-14 Roger Sayle <roger@nextmovesoftware.com>
gcc/ChangeLog
* tree-if-conv.cc (predicate_scalar_phi): Make the arguments
to the std::sort comparison lambda function const.
Cheers,
Roger
--
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 524 bytes --]
diff --git a/gcc/tree-if-conv.cc b/gcc/tree-if-conv.cc
index 91e2eff..799f071 100644
--- a/gcc/tree-if-conv.cc
+++ b/gcc/tree-if-conv.cc
@@ -2204,7 +2204,8 @@ predicate_scalar_phi (gphi *phi, gimple_stmt_iterator *gsi)
}
/* Sort elements based on rankings ARGS. */
- std::sort(argsKV.begin(), argsKV.end(), [](ArgEntry &left, ArgEntry &right) {
+ std::sort(argsKV.begin(), argsKV.end(), [](const ArgEntry &left,
+ const ArgEntry &right) {
return left.second < right.second;
});
next reply other threads:[~2023-07-14 18:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-14 18:56 Roger Sayle [this message]
2023-07-14 19:15 ` Andrew Pinski
2023-07-17 6:19 ` Richard Biener
2023-07-17 7:19 ` Tamar Christina
2023-07-17 7:27 ` Andrew Pinski
2023-07-17 7:35 ` Tamar Christina
2023-07-17 12:00 ` Richard Biener
2023-07-17 13:48 ` Alexander Monakov
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='001201d9b684$e319fdd0$a94df970$@nextmovesoftware.com' \
--to=roger@nextmovesoftware.com \
--cc=Tamar.Christina@arm.com \
--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).