type OGeoOpt
private
type(OConjGrad), allocatable :: pConjGrad
end type OGeoOpt
and
type OConjGrad
private
integer :: state
integer :: nElem
real(dp), allocatable :: gg(:)
:
end type OConjGrad
.
The full example can be found in the DFTB+ repository :
If I replace all move_allocs() with explicit allocate, assignment and deallocate statements, the program compiles, but then immediately segfaults at start (probably unrelated to this problem). All other compilers I’ve tried (ifort 2016, nag 6.1, GNU 5.4 - 7.1) have no problems with it.
The links you provided do not provide all the modfiles needed (like assert.mod) and I am not sure of the steps needed to create the
source files (.f90) from the preprocessed sources (.F90)
If you could provide the files that can be compiled and create the
errors indicated, that would help.
OK, below you find an extracted minimal working example. Compiling it with
pgfortran -c bug.f90
results in
ILM file: can't find intrinsic ..sqrt
ILM file line 203: unknown symbol operand 1
PGF90-F-0000-Internal compiler error. Errors in ILM file 2 (bug.f90)
PGF90/x86-64 Linux 17.4-0: compilation aborted
Best regards,
Bálint
module mod1
implicit none
private
public :: SomeType
type :: SomeType
end type SomeType
end module mod1
module mod2
use mod1
private
type :: TypeWrapper
type(SomeType), allocatable :: instance
end type TypeWrapper
public :: wrap
contains
subroutine wrap(this, instance)
type(TypeWrapper), intent(out) :: this
type(SomeType), allocatable, intent(inout) :: instance
call move_alloc(instance, this%instance)
end subroutine wrap
end module mod2