Sun God

Results 16 comments of Sun God

I made some progress, consider an example: ```c++ #include #include int main() { #pragma omp parallel printf("Hello from thread %d, nthreads %d\n", omp_get_thread_num(), omp_get_num_threads()); return 0; } ``` Output ```console...

Useful links: - https://github.com/llvm/llvm-project/blob/a131525908a908baff4cd01140dae158a307dc9e/openmp/runtime/src/kmp_csupport.cpp#L263 - https://stackoverflow.com/q/52285368/15913193 - https://llvm.org/devmtg/2013-04/bokhanko-bataev-slides.pdf

I think we can do, something similar to the following: ```fortran program openmp use iso_c_binding, only: c_ptr, c_int, c_loc, c_f_pointer implicit none interface subroutine kmpc_fork_call(loc, n, fn) bind(c, name="__kmpc_fork_call") import...

The following works in the C backend: ```fortran program openmp use iso_c_binding, only: c_ptr, c_int, c_loc, c_f_pointer implicit none interface subroutine kmpc_fork_call(loc, n, fn) bind(c, name="__kmpc_fork_call") import :: c_ptr, c_int...

I think we need to handle this in tokeniser, see initial handling of CRLF in the tokeniser: [`4393893` (#1463)](https://github.com/lcompilers/lpython/pull/1463/commits/4393893aa96dc1ad903d999155ecb1eca38d4be1)