[pypy-svn] r73718 - pypy/trunk/pypy/jit/metainterp/test

arigo at codespeak.net arigo at codespeak.net
Tue Apr 13 13:39:33 CEST 2010


Author: arigo
Date: Tue Apr 13 13:39:31 2010
New Revision: 73718

Modified:
   pypy/trunk/pypy/jit/metainterp/test/test_optimizeopt.py
Log:
(cfbolz, arigo)
Make a new test by tweaking the failing test to show a crash at the end
(instead of at the beginning).


Modified: pypy/trunk/pypy/jit/metainterp/test/test_optimizeopt.py
==============================================================================
--- pypy/trunk/pypy/jit/metainterp/test/test_optimizeopt.py	(original)
+++ pypy/trunk/pypy/jit/metainterp/test/test_optimizeopt.py	Tue Apr 13 13:39:31 2010
@@ -1763,6 +1763,29 @@
         """
         self.optimize_loop(ops, 'Virtual(node_vtable2, nextdescr=Virtual(node_vtable), otherdescr=Not)', None)
 
+    @py.test.mark.xfail
+    def test_bug_3bis(self):
+        ops = """
+        [p1]
+        guard_nonnull(p1) []
+        guard_class(p1, ConstClass(node_vtable2)) []
+        p2 = getfield_gc(p1, descr=nextdescr)
+        guard_nonnull(12) []
+        guard_class(p2, ConstClass(node_vtable)) []
+        p3 = getfield_gc(p1, descr=otherdescr)
+        guard_nonnull(12) []
+        guard_class(p3, ConstClass(node_vtable)) []
+        p1a = new_with_vtable(ConstClass(node_vtable2))
+        p2a = new_with_vtable(ConstClass(node_vtable))
+        setfield_gc(p3, p2a, descr=otherdescr)
+        p3a = new_with_vtable(ConstClass(node_vtable))
+        escape(p3a)
+        setfield_gc(p1a, p2a, descr=nextdescr)
+        setfield_gc(p1a, p3a, descr=otherdescr)
+        jump(p1a)
+        """
+        self.optimize_loop(ops, 'Virtual(node_vtable2, nextdescr=Virtual(node_vtable), otherdescr=Not)', None)
+
     def test_invalid_loop_1(self):
         ops = """
         [p1]



More information about the Pypy-commit mailing list