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
Boxiang Sun
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
Show 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):
...
@@ -6539,9 +6539,8 @@ class ParallelRangeNode(ParallelStatNode):
if
node
is
not
None
:
if
node
is
not
None
:
node
.
analyse_types
(
env
)
node
.
analyse_types
(
env
)
if
not
node
.
type
.
is_numeric
:
if
not
node
.
type
.
is_numeric
:
error
(
node
.
pos
,
"%s argument must be numeric or a pointer "
error
(
node
.
pos
,
"%s argument must be numeric"
%
name
)
"(perhaps if a numeric literal is too "
continue
"big, use 1000LL)"
%
name
)
if
not
node
.
is_literal
:
if
not
node
.
is_literal
:
node
=
node
.
coerce_to_temp
(
env
)
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):
...
@@ -118,6 +118,8 @@ for i in prange(10, nogil=True):
with
gil
:
with
gil
:
print
sum
print
sum
for
pyobj
in
prange
(
"hello"
):
pass
_ERRORS
=
u"""
_ERRORS
=
u"""
e_cython_parallel.pyx:3:8: cython.parallel.parallel is not a module
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
...
@@ -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:104:6: Reductions not allowed for parallel blocks
e_cython_parallel.pyx:110:7: local variable 'i' referenced before assignment
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: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