[cython/cython] [BUG] Invalid C code from simple parallel example (Issue #6203)

0 views
Skip to first unread message

da-woods

unread,
May 19, 2024, 3:51:09 AM5/19/24
to cython/cython, Subscribed

Describe the bug

Follow following generates the C error:

error: expected identifier before ‘)’ token
 2442 |             #pragma omp parallel private() firstprivate(__pyx_t_1) private(__pyx_filename, __pyx_lineno, __pyx_clineno) shared(__pyx_parallel_why, __pyx_parallel_exc_type, __pyx_parallel_exc_value, __pyx_parallel_exc_tb)`

Specifically the issue is private(). I think we just need to skip generating it when there's an empty list.

Code to reproduce the behaviour:

from cython.parallel import parallel

def parallelxxx():
    with nogil, parallel():
        with gil:
            s = object()

Expected behaviour

Compilation

OS

Linux

Python version

No response

Cython version

current master

Additional context

No response


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <cython/cython/issues/6203@github.com>

Reply all
Reply to author
Forward
0 new messages