From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 255E6385828B; Fri, 7 Oct 2022 21:08:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 255E6385828B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665176897; bh=9DkPMJEim8tVPK7xiZdI0uvjBFtRI3CIxYlTMmRQjR4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=M/D7EBIShbgz779X45hP6b44OStNDj+ZN6PS2U3GKrDmcMWwK25wO9gs9fKNGd5p7 8kzanEIrVItlhcDrunPFbdDXuJbZ+mBvwAPOoROmejG5gVtP58gdScGk8xX6zrPkIZ KGR2ebhprYaizs4YAJUpsHS9Y/rG59U8LQUK4CoU= From: "mikael at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/66409] Reporting ambiguous interface when overloading assignment with polymorphic array Date: Fri, 07 Oct 2022 21:08:16 +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: mikael at gcc dot gnu.org 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 #9 from Mikael Morin --- (In reply to Jeff Hammond from comment #2) >=20 > My MCVE: >=20 > module f > implicit none >=20 > interface test > module procedure test_f08 > module procedure test_f08ts > end interface test >=20 > contains >=20 > subroutine test_f08(buf) > integer :: buf > end subroutine test_f08 >=20 > subroutine test_f08ts(buffer) > type(*), dimension(..), intent(inout) :: buffer > end subroutine test_f08ts >=20 > end module f The following variant is not pretty, and I don't know if it does the job. But at least it is accepted by the compiler. module f implicit none interface test module procedure test_f08ts end interface test contains subroutine test_f08(buf) integer :: buf end subroutine test_f08 subroutine test_f08ts(buffer) class(*), dimension(..), intent(inout) :: buffer select rank(a =3D> buffer) rank(0) select type(b =3D> a) type is(integer) call test_f08(b) end select end select end subroutine test_f08ts end module f=