public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/114859] [14/15 Regression] Seeing new segmentation fault in same_type_as since r14-9752
Date: Fri, 26 Apr 2024 18:27:25 +0000	[thread overview]
Message-ID: <bug-114859-4-OYrR5GdJkY@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114859-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114859

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Ah, the following shows what is happening and shows similar IL changes in the
*.optimized dump:
module m1
  type  amg_d_base_solver_type
  contains
    procedure, pass(sv) :: free => amg_d_base_solver_free
  end type amg_d_base_solver_type
  interface
    subroutine amg_d_base_solver_free(sv,x)
      import :: amg_d_base_solver_type
      implicit none
      class(amg_d_base_solver_type), intent(inout) :: sv
      integer,intent(inout)          :: x
    end subroutine amg_d_base_solver_free
  end interface
end module m1
module m2
  use m1
  type  amg_d_base_smoother_type
    class(amg_d_base_solver_type), allocatable :: sv
  contains
    procedure, pass(sm) :: free => amg_d_base_smoother_free
  end type amg_d_base_smoother_type
  interface
    subroutine amg_d_base_smoother_free(sm,x)
      import :: amg_d_base_smoother_type, amg_d_base_solver_type
      implicit none
      class(amg_d_base_smoother_type), intent(inout) :: sm
      integer,intent(inout)          :: x
    end subroutine amg_d_base_smoother_free
  end interface
end module m2
module m3
  use m2
  type amg_d_onelev_type
    class(amg_d_base_smoother_type), allocatable   :: sm
  end type amg_d_onelev_type
end module m3
subroutine foo (level, save1, info)
  use m1
  use m2
  use m3
  type(amg_d_onelev_type), intent(inout) :: level
  class(amg_d_base_smoother_type), allocatable , intent(inout) :: save1
  integer,intent(out) :: info
  info = 0
  if (allocated(save1)) then
    call save1%free(info)
    if (info  == 0) deallocate(save1,stat=info)
    if (info /= 0) return
  end if
  allocate(save1, mold=level%sm,stat=info)
end subroutine

  parent reply	other threads:[~2024-04-26 18:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26  3:59 [Bug fortran/114859] New: Seeing new segmentation fault in same_type_as orion at nwra dot com
2024-04-26  7:48 ` [Bug fortran/114859] " jakub at gcc dot gnu.org
2024-04-26  7:55 ` jakub at gcc dot gnu.org
2024-04-26  8:03 ` jakub at gcc dot gnu.org
2024-04-26 15:48 ` jakub at gcc dot gnu.org
2024-04-26 16:50 ` [Bug fortran/114859] [14 Regression] Seeing new segmentation fault in same_type_as since r14-9752 jakub at gcc dot gnu.org
2024-04-26 16:55 ` jakub at gcc dot gnu.org
2024-04-26 16:59 ` jakub at gcc dot gnu.org
2024-04-26 17:10 ` jakub at gcc dot gnu.org
2024-04-26 18:07 ` [Bug fortran/114859] [14/15 " jakub at gcc dot gnu.org
2024-04-26 18:27 ` jakub at gcc dot gnu.org [this message]
2024-04-27 14:50 ` pault at gcc dot gnu.org
2024-04-27 18:58 ` jakub at gcc dot gnu.org
2024-04-28  5:37 ` pault at gcc dot gnu.org
2024-04-28 21:19 ` pault at gcc dot gnu.org
2024-04-29  9:11 ` jakub at gcc dot gnu.org
2024-04-29 11:06 ` pault at gcc dot gnu.org
2024-04-29 18:45 ` anlauf at gcc dot gnu.org
2024-04-30  8:21 ` jakub 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-114859-4-OYrR5GdJkY@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).