From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ED5F2385E019; Wed, 14 Apr 2021 21:37:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ED5F2385E019 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 21:37:15 +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 21:37:16 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63797 --- Comment #7 from Steve Kargl -= -- On Wed, Apr 14, 2021 at 08:43:50PM +0000, anlauf at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63797 >=20 > --- Comment #6 from anlauf at gcc dot gnu.org --- > Steve, can you give an example for the procedure pointer case you mention= ed? > I played a bit, but the only valid code that I can think of did not produ= ce > a reference to sqrt in such a way that it needs to show up in the mod. >=20 > Extended testcase that compiles and also uses a procedure pointer to sqrt= (): >=20 Your testcase is what I first thought about, but didn't try to write. The only other instance that I might be concerned about is=20 module aaa abstract interface function real_func (x) real :: real_func real, intent (in) :: x end function real_func end interface procedure(real_func), pointer :: bah =3D> sqrt end module aaa which looks like a default initialization. Does sqrt need to be recorded into the module? If not, then your patch is probably ok.=