From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3A946383B78C; Sun, 29 May 2022 03:33:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A946383B78C From: "lh_mouse at 126 dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/105764] New: libgfortran fails to build with a custom thread model Date: Sun, 29 May 2022 03:33:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: 12.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: lh_mouse at 126 dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2022 03:33:55 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105764 Bug ID: 105764 Summary: libgfortran fails to build with a custom thread model Product: gcc Version: 12.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran Assignee: unassigned at gcc dot gnu.org Reporter: lh_mouse at 126 dot com Target Milestone: --- Created attachment 53049 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53049&action=3Dedit proposed patch Bootstrapping GCC with fortran enabled and a custom thread model can fail: ``` In file included from ../../../gcc/libgfortran/runtime/error.c:28: ../../../gcc/libgfortran/io/async.h:354:3: error: unknown type name 'pthrea= d_t' 354 | pthread_t thread; | ^~~~~~~~~ ``` In commit a79878585a1c5e32bafbc6d1e73f91fd6e4293bf, `pthread_mutex_t` was replaced with `__gthread_mutex_t`, but `pthread_t` was left over. Not sure whether this was by design, or was an oversight. Patch also sent to gcc-patches: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595754.html=