[pypy-commit] pypy default: Add a test from the stm branch

arigo noreply at buildbot.pypy.org
Fri Feb 20 14:26:04 CET 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r76013:f90ce9affa58
Date: 2015-02-20 13:14 +0100
http://bitbucket.org/pypy/pypy/changeset/f90ce9affa58/

Log:	Add a test from the stm branch

diff --git a/rpython/translator/c/test/test_lltyped.py b/rpython/translator/c/test/test_lltyped.py
--- a/rpython/translator/c/test/test_lltyped.py
+++ b/rpython/translator/c/test/test_lltyped.py
@@ -957,6 +957,16 @@
         fn = self.getcompiled(f, [int])
         assert fn(0) == 9
 
+    def test_call_null_funcptr(self):
+        fnptr = nullptr(FuncType([], Void))
+        def f(n):
+            if n > 10:
+                fnptr()    # never reached, or so we hope
+            return n
+
+        fn = self.getcompiled(f, [int])
+        assert fn(6) == 6
+
     def test_likely_unlikely(self):
         from rpython.rlib.objectmodel import likely, unlikely
 


More information about the pypy-commit mailing list