Pushed.
Thanks,
Jørgen
On 7/16/24 09:49, Roger Sayle wrote:
Hi Jørgen,
Awesome. Very many thanks for the speedy fix.
Roger
--
-----Original Message-----
From: Jørgen Kvalsvik <j...@lambda.is>
Sent: 14 July 2024 20:46
To: gcc-patches@gcc.gnu.org
Cc: jeffreya...@gmail.com; ro...@nextmovesoftware.com; Jørgen Kvalsvik
<j...@lambda.is>
Subject: [PATCH] Use foreach, not lmap, for tcl <= 8.5 compat
lmap was introduced in tcl 8.6, and while it was released in 2012, lmap does not
really make too much of a difference to warrant the friction on consverative
(and
relevant) systems.
gcc/testsuite/ChangeLog:
* lib/gcov.exp: Use foreach for tcl <= 8.5.
---
gcc/testsuite/lib/gcov.exp | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/gcc/testsuite/lib/gcov.exp b/gcc/testsuite/lib/gcov.exp index
3fc7b65bee5..68696c9aa50 100644
--- a/gcc/testsuite/lib/gcov.exp
+++ b/gcc/testsuite/lib/gcov.exp
@@ -512,25 +512,29 @@ proc verify-filters { testname testcase file expected
unexpected } {
set seen [lsort -unique $seen]
- set expected [lmap key $expected {
- if { $key in $seen } continue
- set key
- }]
- set unexpected [lmap key $unexpected {
- if { $key ni $seen } continue
- set key
- }]
-
- foreach sym $expected {
+ set ex {}
+ foreach key $expected {
+ if { $key ni $seen } {
+ lappend ex $key
+ }
+ }
+ set unex {}
+ foreach key $unexpected {
+ if { $key in $seen } {
+ lappend unex $key
+ }
+ }
+
+ foreach sym $ex {
fail "Did not see expected symbol '$sym'"
}
- foreach sym $unexpected {
+ foreach sym $unex {
fail "Found unexpected symbol '$sym'"
}
close $fd
- return [expr [llength $expected] + [llength $unexpected]]
+ return [expr [llength $ex] + [llength $unex]]
}
proc verify-prime-paths { testname testcase file } {
--
2.39.2