robertwb / issues-import-test

0 stars 0 forks source link

prange doesn't properly parse reduction in if-elif-else trees #127

Open robertwb opened 7 years ago

robertwb commented 7 years ago

Reported by ohanar on 23 Mar 2012 23:43 UTC The Cython compiler throws an UnboundLocalError on the x += 2 line for the following block of valid Cython code

cdef int x,i
for i in prange(0xffff, nogil=True):
    # x += 0
    if i < 0xff:
        x += 1
    else:
        x += 2

Currently you can work around this by uncommenting the commented line.

Migrated-From: http://trac.cython.org/ticket/764

robertwb commented 7 years ago

Modified by ohanar on 23 Mar 2012 23:45 UTC