http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59493
Bug ID: 59493
Summary: internal compiler error: Segmentation fault on
Class(*) pointer association with GCC 4.8.1
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: talebi.hossein at gmail dot com
Hi there,
I get the segmentation fault on compilation of this code. This compiles with
Intel Fortran Compiler.
module mode1
implicit none
integer :: a=1
type ty_mytype1
integer :: b1=1
end type ty_mytype1
type, extends(ty_mytype1) :: ty_extend
integer :: b2=2
end type ty_extend
end module mode1
program hello
use mode1
implicit none
class(ty_mytype1), allocatable,target:: cla1
class(*), pointer :: ptr_cla1
allocate(ty_extend :: cla1)
ptr_cla1 => cla1
print *, 'cla1%b1', cla1%b1
end program