在 2022-10-02 04:02, Bernhard Reutner-Fischer 写道: > On 1 October 2022 20:34:45 CEST, LIU Hao via Gcc-patches wrote: >> Greetings. > >> The first patch is necessary because somewhere in libgfortran, `pthread_t` is referenced. If the thread model is not `posix`, it fails to compile. > > One of several shortcomings mentioned already on Sun, 02 Sep 2018 15:40:28 -0700 in > https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg196212.html > Forgive me but I didn't get your point. Is the 'shortcoming' the fact that `pthread_t` must be preferred to `__gthread_t`? For non-posix thread models, is not included, so `pthread_t` is not declared. I haven't looked at other code in libgfortran, but changing `pthread_t` to `__gthread_t` does allow libgfortran to build. I don't know how to test it though, as I don't write Fortran myself. -- Best regards, LIU Hao