I am experiencing an unexpected segfault when running the following simple program, after compiling with pgf90 version 14.9. gfortran 4.8.3 and ifort 14.0.1 seem to handle it just fine. Am I missing something, or is this due a compiler bug?
main.f90:
program run
use types
implicit none
type(child2) :: child
call child%fun1()
end program run
types.f90:
module types
implicit none
public
type, abstract :: base
contains
procedure :: fun1 => base_fun1
procedure :: fun2 => base_fun2
end type base
type, extends(base) :: child1
contains
procedure :: fun2 => child1_fun2
end type child1
type, extends(base) :: child2
contains
procedure :: fun2 => child2_fun2
end type child2
contains
subroutine base_fun1(this)
class(base) :: this
end subroutine base_fun1
subroutine base_fun2(this, temps)
class(base) :: this
real, intent(in) :: temps(:)
end subroutine base_fun2
subroutine child1_fun2(this, temps)
class(child1) :: this
real, intent(in) :: temps(:)
end subroutine child1_fun2
subroutine child2_fun2(this, temps)
class(child2) :: this
real, intent(in) :: temps(:)
end subroutine child2_fun2
end module types