public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix bootstrap failure (with g++ 4.8.5) in tree-if-conv.cc.
@ 2023-07-14 18:56 Roger Sayle
  2023-07-14 19:15 ` Andrew Pinski
  2023-07-17  6:19 ` Richard Biener
  0 siblings, 2 replies; 8+ messages in thread
From: Roger Sayle @ 2023-07-14 18:56 UTC (permalink / raw)
  To: gcc-patches; +Cc: 'Tamar Christina'


[-- 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;
   });
 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-07-17 13:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-14 18:56 [PATCH] Fix bootstrap failure (with g++ 4.8.5) in tree-if-conv.cc Roger Sayle
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

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).