Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xavier Thompson
cython
Commits
e4d366ee
Commit
e4d366ee
authored
Aug 01, 2011
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compiler crash on non-numeric argument to prange()
parent
2a3f533e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+2
-3
tests/errors/e_cython_parallel.pyx
tests/errors/e_cython_parallel.pyx
+4
-0
No files found.
Cython/Compiler/Nodes.py
View file @
e4d366ee
...
...
@@ -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
)
...
...
tests/errors/e_cython_parallel.pyx
View file @
e4d366ee
...
...
@@ -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
"""
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment