Re: [PATCH] libgfortran: Bugfix if not define HAVE_ATOMIC_FETCH_ADD

2024-01-03 Thread Lipeng Zhu
On 2024/1/3 19:12, Tobias Burnus wrote: On 22.12.23 03:36, Lipeng Zhu wrote: This patch try to fix the bug when HAVE_ATOMIC_FETCH_ADD is not defined in dec_waiting_unlocked function. libgfortran/ChangeLog:   * io/io.h (dec_waiting_unlocked): Use   __gthread_rwlock_wrlock/__gthread_r

Re: [PATCH] libgfortran: Bugfix if not define HAVE_ATOMIC_FETCH_ADD

2024-01-03 Thread Jerry D
On 1/3/24 3:12 AM, Tobias Burnus wrote: On 22.12.23 03:36, Lipeng Zhu wrote: This patch try to fix the bug when HAVE_ATOMIC_FETCH_ADD is not defined in dec_waiting_unlocked function. libgfortran/ChangeLog:   * io/io.h (dec_waiting_unlocked): Use   __gthread_rwlock_wrlock/__gthread_rwlo

[PATCH, committed] Fortran: fix FE memleak

2024-01-03 Thread Harald Anlauf
Dear all, I've committed the attached, simple & obvious patch for a gmp memory leak in gfc_get_nodesc_array_type that shows up when running f951 under valgrind e.g. on testcase gfortran.dg/class_optional_2.f90, after regtesting on x86_64-pc-linux-gnu. (Note that this does not address the underlyi

Re: [PATCH] libgfortran: Bugfix if not define HAVE_ATOMIC_FETCH_ADD

2024-01-03 Thread Tobias Burnus
On 22.12.23 03:36, Lipeng Zhu wrote: This patch try to fix the bug when HAVE_ATOMIC_FETCH_ADD is not defined in dec_waiting_unlocked function. libgfortran/ChangeLog: * io/io.h (dec_waiting_unlocked): Use __gthread_rwlock_wrlock/__gthread_rwlock_unlock or __gthread_mutex_lock/_

Re: RE: [PATCH v7] libgfortran: Replace mutex with rwlock

2024-01-03 Thread Lipeng Zhu
On 2023/12/21 19:42, Thomas Schwinge wrote: Hi! On 2023-12-13T21:52:29+0100, I wrote: On 2023-12-12T02:05:26+, "Zhu, Lipeng" wrote: On 2023/12/12 1:45, H.J. Lu wrote: On Sat, Dec 9, 2023 at 7:25 PM Zhu, Lipeng wrote: On 2023/12/9 23:23, Jakub Jelinek wrote: On Sat, Dec 09, 2023 at