Commit e4d366ee authored by Mark Florisson's avatar Mark Florisson

Fix compiler crash on non-numeric argument to prange()

parent 2a3f533e
......@@ -6539,9 +6539,8 @@ class ParallelRangeNode(ParallelStatNode):
if node is not None:
node.analyse_types(env)
if not node.type.is_numeric:
error(node.pos, "%s argument must be numeric or a pointer "
"(perhaps if a numeric literal is too "
"big, use 1000LL)" % name)
error(node.pos, "%s argument must be numeric" % name)
continue
if not node.is_literal:
node = node.coerce_to_temp(env)
......
......@@ -118,6 +118,8 @@ for i in prange(10, nogil=True):
with gil:
print sum
for pyobj in prange("hello"):
pass
_ERRORS = u"""
e_cython_parallel.pyx:3:8: cython.parallel.parallel is not a module
......@@ -147,4 +149,6 @@ e_cython_parallel.pyx:98:19: Cannot assign to private of outer parallel block
e_cython_parallel.pyx:104:6: Reductions not allowed for parallel blocks
e_cython_parallel.pyx:110:7: local variable 'i' referenced before assignment
e_cython_parallel.pyx:119:17: Cannot read reduction variable in loop body
e_cython_parallel.pyx:121:20: stop argument must be numeric
e_cython_parallel.pyx:121:19: prange() can only be used without the GIL
"""
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment