Blame SOURCES/0017-Conditionalize-test-for-PR-libstdc-71181-on-__LIBSTD.patch

53dace
From 102adc148612b50a4e3f12a88871ddc47bfb469e Mon Sep 17 00:00:00 2001
53dace
From: David Malcolm <dmalcolm@redhat.com>
53dace
Date: Thu, 2 Sep 2021 17:17:50 -0400
53dace
Subject: [PATCH 17/17] Conditionalize test for PR libstdc++/71181 on
53dace
 __LIBSTDCXX_SO_VERSION >= 7
53dace
53dace
This test was added upstream 2016-06-20 as part of:
53dace
  re PR libstdc++/71181 (Reserving in unordered_map doesn't reserve enough)
53dace
    https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=29dbb034cb3199167a9d0aaed040733c72326eed
53dace
53dace
but fails when run in DTS against a system libstdc++.so from an older GCC.
53dace
---
53dace
 .../testsuite/23_containers/unordered_set/hash_policy/71181.cc | 3 +++
53dace
 1 file changed, 3 insertions(+)
53dace
53dace
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/hash_policy/71181.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/hash_policy/71181.cc
53dace
index 324d735b8..b2dcd0137 100644
53dace
--- a/libstdc++-v3/testsuite/23_containers/unordered_set/hash_policy/71181.cc
53dace
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/hash_policy/71181.cc
53dace
@@ -39,7 +39,10 @@ template<typename _USet>
53dace
 
53dace
 	us.insert(nb_insert);
53dace
 
53dace
+	// Fixed upstream in GCC 7
53dace
+#if __LIBSTDCXX_SO_VERSION >= 7
53dace
 	VERIFY( us.bucket_count() == bkts );
53dace
+#endif
53dace
       }
53dace
   }
53dace
 
53dace
-- 
53dace
2.31.1
53dace