Issue #8847: Merge with 3.2

This commit is contained in:
Martin v. Löwis 2012-08-01 11:09:55 +02:00
commit a562ed012d
4 changed files with 19 additions and 1 deletions

View file

@ -193,6 +193,14 @@ class TupleTest(seq_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 T(tuple): pass
with self.assertRaises(TypeError):
[3,] + T((1,2))
def test_main():
support.run_unittest(TupleTest)