public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pault at gcc dot gnu.org" <gcc-bugzilla@gcc.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 [thread overview]
Message-ID: <bug-99602-4-C8RcUlYsCh@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99602-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99602
--- Comment #8 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Jürgen 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
>
> module m2_testbed
> use m
> implicit none
> private
> public :: prepare_m2
> procedure (prepare_m2_proc), pointer :: prepare_m2 => null ()
>
> abstract interface
> subroutine prepare_m2_proc (m2)
> import
> class(m_t), intent(inout), pointer :: m2
> end subroutine prepare_m2_proc
> end interface
>
> end module m2_testbed
>
> module a
> use m
> use m2_testbed, only: prepare_m2
> implicit none
> private
> public :: a_1
>
> contains
>
> subroutine a_1 ()
> class(m_t), pointer :: mm
> mm => null ()
> call prepare_m2 (mm)
> end subroutine a_1
>
> end module a
>
>
> module m2
> use m
> implicit none
> private
> public :: m2_t
>
> type, extends (m_t) :: m2_t
> private
> contains
> procedure :: read => m2_read
> end type m2_t
> contains
>
> subroutine m2_read (mm)
> class(m2_t), intent(out), target :: mm
> end subroutine m2_read
> end module m2
>
> program main
> use m2_testbed
> use a, only: a_1
> implicit none
> prepare_m2 => prepare_whizard_m2
> call a_1 ()
>
> contains
>
> subroutine prepare_whizard_m2 (mm)
> use m
> use m2
> class(m_t), intent(inout), pointer :: mm
> if (.not. associated (mm)) allocate (m2_t :: mm)
> 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 does
not appear in the tree dump.
Best regards
Paul
next prev parent reply other threads:[~2021-03-16 8:31 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-15 14:24 [Bug fortran/99602] New: " juergen.reuter at desy dot de
2021-03-15 14:39 ` [Bug fortran/99602] " juergen.reuter at desy dot de
2021-03-15 23:01 ` juergen.reuter at desy dot de
2021-03-15 23:07 ` juergen.reuter at desy dot de
2021-03-16 7:30 ` juergen.reuter at desy dot de
2021-03-16 7:31 ` juergen.reuter at desy dot de
2021-03-16 7:32 ` juergen.reuter at desy dot de
2021-03-16 7:33 ` juergen.reuter at desy dot de
2021-03-16 8:14 ` rguenth at gcc dot gnu.org
2021-03-16 8:31 ` pault at gcc dot gnu.org [this message]
2021-03-16 8:43 ` juergen.reuter at desy dot de
2021-03-16 10:29 ` juergen.reuter at desy dot de
2021-03-16 11:50 ` pault at gcc dot gnu.org
2021-03-16 13:45 ` pault at gcc dot gnu.org
2021-03-16 13:47 ` juergen.reuter at desy dot de
2021-03-16 20:29 ` anlauf at gcc dot gnu.org
2021-03-17 13:51 ` juergen.reuter at desy dot de
2021-03-17 17:57 ` anlauf at gcc dot gnu.org
2021-03-18 7:26 ` paul.richard.thomas at gmail dot com
2021-03-18 20:58 ` juergen.reuter at desy dot de
2021-03-18 23:03 ` juergen.reuter at desy dot de
2021-03-18 23:54 ` juergen.reuter at desy dot de
2021-03-19 1:20 ` juergen.reuter at desy dot de
2021-03-19 2:23 ` juergen.reuter at desy dot de
2021-03-19 2:24 ` juergen.reuter at desy dot de
2021-03-19 7:37 ` juergen.reuter at desy dot de
2021-03-19 8:16 ` juergen.reuter at desy dot de
2021-03-19 9:35 ` pault at gcc dot gnu.org
2021-03-19 9:53 ` juergen.reuter at desy dot de
2021-03-21 18:53 ` pault at gcc dot gnu.org
2021-03-21 22:25 ` juergen.reuter at desy dot de
2021-03-23 19:31 ` juergen.reuter at desy dot de
2021-03-24 6:31 ` pault at gcc dot gnu.org
2021-03-24 8:25 ` juergen.reuter at desy dot de
2021-03-28 18:40 ` cvs-commit at gcc dot gnu.org
2021-03-29 10:31 ` juergen.reuter at desy dot de
2021-04-27 11:40 ` [Bug fortran/99602] [11/12 " jakub at gcc dot gnu.org
2021-05-04 12:32 ` rguenth at gcc dot gnu.org
2021-07-28 7:06 ` rguenth at gcc dot gnu.org
2021-07-28 13:01 ` pault at gcc dot gnu.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-99602-4-C8RcUlYsCh@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).