summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_list.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_list.py')
-rw-r--r--Lib/test/test_list.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_list.py b/Lib/test/test_list.py
index 302c1d8..5df27d3 100644
--- a/Lib/test/test_list.py
+++ b/Lib/test/test_list.py
@@ -98,6 +98,14 @@ class ListTest(list_tests.CommonTest):
d = pickle.dumps(it)
self.assertEqual(self.type2test(it), self.type2test(reversed(data))[1:])
+ def test_no_comdat_folding(self):
+ # Issue 8847: In the PGO build, the MSVC linker's COMDAT folding
+ # optimization causes failures in code that relies on distinct
+ # function addresses.
+ class L(list): pass
+ with self.assertRaises(TypeError):
+ (3,) + L([1,2])
+
def test_main(verbose=None):
support.run_unittest(ListTest)