[Bug fortran/88393] New: [7/8/9 Regression] [OOP] Segfault with type-bound assignment
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Dec 6 15:21:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88393
Bug ID: 88393
Summary: [7/8/9 Regression] [OOP] Segfault with type-bound
assignment
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: janus at gcc dot gnu.org
Target Milestone: ---
Simple test case:
module m
implicit none
type :: t
character(len=:), allocatable :: cs
contains
procedure :: ass
generic :: assignment(=) => ass
end type
contains
subroutine ass(a, b)
class(t), intent(inout) :: a
class(t), intent(in) :: b
print *, "ass"
end subroutine
end module
program p
use m
implicit none
type :: t2
type(t) :: c
end type
type(t2), dimension(1:2) :: arr
arr(2)%c = arr(1)%c
print *, "done"
end
While this runs flawlessly with gfortran 6.4.0, it segfaults at runtime with
7.3.0 and above.
More information about the Gcc-bugs
mailing list