From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 55CD9395540D; Wed, 14 Apr 2021 01:25:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 55CD9395540D From: "sgk at troutmask dot apl.washington.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/63797] Bogus ambiguous reference to 'sqrt' Date: Wed, 14 Apr 2021 01:25:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: sgk at troutmask dot apl.washington.edu 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: 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: Wed, 14 Apr 2021 01:25:48 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63797 --- Comment #5 from Steve Kargl -= -- On Tue, Apr 13, 2021 at 08:49:35PM +0000, anlauf at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63797 >=20 > --- Comment #4 from anlauf at gcc dot gnu.org --- > The following patch regtests ok and fixes the testcase: >=20 > diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c > index 4db0a3ac76d..b4b7b437f86 100644 > --- a/gcc/fortran/module.c > +++ b/gcc/fortran/module.c > @@ -6218,6 +6218,9 @@ write_symtree (gfc_symtree *st) > if (check_unique_name (st->name)) > return; >=20 > + if (strcmp (sym->module, "(intrinsic)") =3D=3D 0) > + return; > + > p =3D find_pointer (sym); > if (p =3D=3D NULL) > gfc_internal_error ("write_symtree(): Symbol not written"); >=20 >=20 > It even fixes the slightly reduced & refined testcase: >=20 Harald, if this survives regression testing, it might be appropriate to commit. The only issue I can think of=20 is procedure pointers. I don't use them, but if one can point at sqrt (or dsqrt, i.e., with specific vs generic name), then is [d]sqrt needed to be written into the module?=