http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51946
--- Comment #8 from kargl at gcc dot gnu.org 2012-01-22 19:54:11 UTC ---
Reduced testcase
module integrable_model_module
implicit none
type, abstract, public :: integrable_model
contains
procedure(default_constructor), deferred :: empty_instance
end type
abstract interface
function default_constructor(this) result(blank_slate)
import :: integrable_model
class(integrable_model), intent(in) :: this
class(integrable_model), allocatable :: blank_slate
end function
end interface
contains
subroutine integrate(this)
class(integrable_model), intent(inout) :: this
class(integrable_model), allocatable :: residual
allocate(residual, source=this%empty_instance())
end subroutine
end module integrable_model_module
laptop:kargl[315] gfc4x -c foo.f90
foo.f90: In function 'integrate':
foo.f90:23:0: internal compiler error: in conv_function_val, at
fortran/trans-expr.c:2191
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
laptop:kargl[316] gfc4x -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/home/kargl/work/libexec/gcc/i386-unknown-freebsd10.0/4.7.0/lto-wrapper
Target: i386-unknown-freebsd10.0
Configured with: ../gcc4x/configure --prefix=/usr/home/kargl/work
--enable-languages=c,fortran --disable-libmudflap --disable-bootstrap
Thread model: posix
gcc version 4.7.0 20120119 (experimental) (GCC)