Hello. I’m using PGI Fortran 12.2 on x86_64 Ubuntu Linux.
I’m trying to compile following source, that consists of two files:
module:
module capmat
real*8, allocatable, target :: CAPV(:,:),CAPVI(:,:)
real :: CAPVV,CAPVVI
pointer (pCAPVV,CAPVV(:,:))
pointer (pCAPVVI, CAPVVI(:,:))
contains
subroutine capmat_init
allocate(CAPV(10,10))
allocate(CAPVI(10,10))
pCAPVV = LOC(CAPV)
pCAPVVI = LOC(CAPVI)
End
End
program
use capmat
call capmat_init
open( 80,file='CAPMAT.dat' )
IIUNIT=80
WRITE(IIUNIT,*)'CAPVV'
WRITE(IIUNIT,*)CAPVV
WRITE(IIUNIT,*)'CAPVVI'
WRITE(IIUNIT,*)CAPVVI
CLOSE(80)
END
Compiling this two files result in
pgf95 capmat_test.f95 capflt3_test.for
capmat_test.f95:
capflt3_test.for:
Lowering Error: unexpected data type at assignment [ast=64,asttype=17,datatype=0]
Lowering Error: unexpected data type at assignment [ast=72,asttype=17,datatype=0]
Lowering Error: unexpected data type at assignment [ast=77,asttype=17,datatype=0]
Lowering Error: unexpected data type at assignment [ast=80,asttype=17,datatype=0]
Lowering Error: unexpected data type at assignment [ast=83,asttype=17,datatype=0]
Lowering Error: unexpected data type at assignment [ast=91,asttype=17,datatype=0]
Lowering Error: unexpected data type at assignment [ast=93,asttype=17,datatype=0]
Lowering Error: unexpected data type at assignment [ast=96,asttype=17,datatype=0]
Lowering Error: unexpected data type at assignment [ast=99,asttype=17,datatype=0]
Lowering Error: unexpected data type at assignment [ast=101,asttype=17,datatype=0]
Lowering Error: unexpected data type at assignment [ast=105,asttype=17,datatype=0]
Lowering Error: unknown constant type for LHS or argument [ast=85,asttype=2,datatype=0]
Lowering Error: untyped operation UFUNC (type 0)
Lowering Error: unexpected data type at assignment [ast=108,asttype=17,datatype=0]
Lowering Error: unexpected data type at assignment [ast=110,asttype=17,datatype=0]
Lowering Error: unexpected data type at assignment [ast=114,asttype=17,datatype=0]
PGF90-F-0000-Internal compiler error. Errors in Lowering 16 (capflt3_test.for: 11)
PGF90/x86-64 Linux 12.2-0: compilation aborted
But if i try the same without module, in a single file, it compiles with no error.
It looks like some compiler error. Is there some workaround?