diff options
author | Roger Sayle <roger@nextmovesoftware.com> | 2023-07-17 07:35:08 +0100 |
---|---|---|
committer | Roger Sayle <roger@nextmovesoftware.com> | 2023-07-17 07:35:08 +0100 |
commit | 5ae1f391934a853a36f4bcc5a849c7900bec43b0 (patch) | |
tree | e19d74ff0748d159918b7971d60ba8e7c702cdb0 /gcc | |
parent | d20e542ecd8cfc009b120f9e432caeb7005e7c53 (diff) | |
download | gcc-5ae1f391934a853a36f4bcc5a849c7900bec43b0.zip gcc-5ae1f391934a853a36f4bcc5a849c7900bec43b0.tar.gz gcc-5ae1f391934a853a36f4bcc5a849c7900bec43b0.tar.bz2 |
Fix bootstrap failure (with g++ 4.8.5) in tree-if-conv.cc.
This patch fixes the bootstrap failure I'm seeing using gcc 4.8.5 as
the host compiler.
2023-07-17 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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/tree-if-conv.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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; }); |