This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/81898] [7/8 Regression] Issue with polymorphic container class
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 20 Aug 2017 11:46:31 +0000
- Subject: [Bug fortran/81898] [7/8 Regression] Issue with polymorphic container class
- Auto-submitted: auto-generated
- References: <bug-81898-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81898
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-08-20
CC| |janus at gcc dot gnu.org
Summary|Issue with polymorphic |[7/8 Regression] Issue with
|container class |polymorphic container class
Ever confirmed|0 |1
--- Comment #1 from janus at gcc dot gnu.org ---
Here is a further reduced and modified version of the original test case:
module AModule
implicit none
type :: BType
end type
type:: AType
class(BType), allocatable :: obj
type(BType), pointer :: bobj
contains
procedure :: a_rd
end type
contains
subroutine a_rd(this)
! -- dummy
class(AType) :: this
write(*,*) 'in a_rd'
end subroutine
end module
program main
use AModule
implicit none
class(AType), allocatable, target :: a
allocate(a)
allocate(a%obj)
a%bobj => a%obj
write(*,*) 'calling a_rd'
call a%a_rd()
end
It compiles and runs file with gfortran 6 and earlier, but fails with a runtime
segfault with gfortran 7 and trunk. Indeed looks like a wrong-code regression.