Author: Armin Rigo <[email protected]>
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
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to