From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2C3CB3858D29; Mon, 21 Dec 2020 00:53:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C3CB3858D29 From: "kargl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/98301] random_init() is broken Date: Mon, 21 Dec 2020 00:53:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kargl at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: 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: Mon, 21 Dec 2020 00:53:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98301 --- Comment #4 from kargl at gcc dot gnu.org --- Created attachment 49816 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D49816&action=3Dedit Newest patch. This new patch implements Thomas idea of generating appropriate library cal= ls for the different ways that gfortran handles coarrays. * gcc/fortran/trans-decl.c: . Add definitions for gfor_fndecl_caf_random_init and gfor_fndecl_cas_random_init. * gcc/fortran/trans-intrinsic.c: . For -fcoarray=3Dlib, generate a call to _gfortran_caf_random_init(). . For -fcoarray=3Dshared, generate a call to _gfortran_cas_random_init(). . For -fcoarray=3Dsingle or without the -fcoarray option, generate a call to _gfortran_random_init(). * gcc/fortran/trans.h: . Add declares for gfor_fndecl_caf_random_init and gfor_fndecl_cas_random_init * libgfortran/intrinsics/random_init.f90: . Rework _gfortran_random_init(), but preserve the ABI.=