From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 001B83858C56; Fri, 7 Oct 2022 19:54:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 001B83858C56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665172461; bh=zfAO/z30OlhKgQnrrzYwFDi49j8HEI5NduGvwlQ62h8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wfIKDvXiREiTadn5ffoYpSbDA6GybF6ySwZ1tkHDuYPEk3JzjtWyHoxH/P3wMCbWg Ucbx3Tm6bwW7mlUT+TPOdq1ny3yZWjcMAyhgP7dYAwWwi3lrLrr6yoZBNpwJebWkUT pOCldQ7M4SNUm2gH/Xvw/+ZwKNaHbT05MIiOp4iI= From: "sgk at troutmask dot apl.washington.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/66409] Reporting ambiguous interface when overloading assignment with polymorphic array Date: Fri, 07 Oct 2022 19:54:20 +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: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sgk at troutmask dot apl.washington.edu X-Bugzilla-Status: WAITING 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: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D66409 --- Comment #5 from Steve Kargl -= -- On Fri, Oct 07, 2022 at 07:15:59PM +0000, anlauf at gcc dot gnu.org wrote: >=20 > @Steve: I thought there is something in the standard that says how the > resolution (specific then generic) works, but cannot find it now... >=20 type(*) =3D match any type and its type kind parameters dimension(..) =3D match any rank, which includes rank 0. function foo(i) integer i end foo function bar(i) type(*), dimension(..) :: i end bar Both match type "integer", kind "4", rank "0". AFAIK, there is no other consideration than TKR to discern which function to call. Perhaps, someone, who cares about this bug, can point at the language in the Fortran standard.=