From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9D8A63854808; Tue, 16 Mar 2021 08:31:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D8A63854808 From: "pault at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/99602] [11 regression] runtime error: pointer actual argument not associated Date: Tue, 16 Mar 2021 08:31:13 +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: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pault at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 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: Tue, 16 Mar 2021 08:31:13 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99602 --- Comment #8 from Paul Thomas --- (In reply to J=C3=BCrgen Reuter from comment #6) > Actually, the last example missed a line that I overeagerly deleted too > much. This one is the correct reproducer: > module m > implicit none > private > public :: m_t > type :: m_t > private > end type m_t > end module m >=20 > module m2_testbed > use m > implicit none > private > public :: prepare_m2 > procedure (prepare_m2_proc), pointer :: prepare_m2 =3D> null () >=20 > abstract interface > subroutine prepare_m2_proc (m2) > import > class(m_t), intent(inout), pointer :: m2 > end subroutine prepare_m2_proc > end interface >=20 > end module m2_testbed >=20 > module a > use m > use m2_testbed, only: prepare_m2 > implicit none > private > public :: a_1 >=20 > contains >=20 > subroutine a_1 () > class(m_t), pointer :: mm > mm =3D> null () > call prepare_m2 (mm) > end subroutine a_1 >=20 > end module a >=20 >=20 > module m2 > use m > implicit none > private > public :: m2_t >=20=20=20 > type, extends (m_t) :: m2_t > private > contains > procedure :: read =3D> m2_read > end type m2_t > contains >=20 > subroutine m2_read (mm) > class(m2_t), intent(out), target :: mm > end subroutine m2_read > end module m2 >=20 > program main > use m2_testbed > use a, only: a_1 > implicit none > prepare_m2 =3D> prepare_whizard_m2 > call a_1 () >=20=20=20 > contains >=20 > subroutine prepare_whizard_m2 (mm) > use m > use m2 > class(m_t), intent(inout), pointer :: mm > if (.not. associated (mm)) allocate (m2_t :: mm)=20=20=20=20 > select type (mm) > type is (m2_t) > call mm%read () > end select > end subroutine prepare_whizard_m2 > end program main Hi Juergen, I still cannot reproduce the problem. In fact, the runtime error message do= es not appear in the tree dump. Best regards Paul=