PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Internal compiler error. Errors in Lowering

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
Senya



Joined: 20 Jun 2011
Posts: 58

PostPosted: Wed Jun 27, 2012 3:55 am    Post subject: Internal compiler error. Errors in Lowering Reply with quote

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:
Code:

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
Code:

      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
Quote:

> 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?
Back to top
View user's profile
toepfer



Joined: 04 Dec 2007
Posts: 47

PostPosted: Wed Jun 27, 2012 4:26 pm    Post subject: Reply with quote

I was able to reproduce the failure and will investigate and will post what I find. Thanks for the example!
Back to top
View user's profile
toepfer



Joined: 04 Dec 2007
Posts: 47

PostPosted: Thu Jun 28, 2012 8:10 am    Post subject: Reply with quote

The issue is the mixing of F90 allocatables and Cray pointers. This really shouldn't be
done. A better way would be to use F90 pointers instead of the Cray pointers. Here are the
changes needed for the capmat module that will allow this example to compile successfully.

Code:
module capmat

    real*8, allocatable, target :: CAPV(:,:),CAPVI(:,:)

    real*8, pointer :: CAPVV(:,:)
    real*8, pointer :: CAPVVI(:,:)


  contains
    subroutine capmat_init
   allocate(CAPV(10,10))
   allocate(CAPVI(10,10))

   CAPVV => CAPV
   CAPVVI => CAPVI

    End subroutine

End
Back to top
View user's profile
Senya



Joined: 20 Jun 2011
Posts: 58

PostPosted: Thu Jun 28, 2012 1:50 pm    Post subject: Reply with quote

I need pointers for a different types. This way i'm trying to replace old equivalence statement. Operator => doesn't work, if CAPVV is real*8, and CAPV is real.

Cray pointers work, if used without module. I need some way to have different typed pointers, that point to the same place.

Where is the mixing? I don't use F90 pointers in this example.
Back to top
View user's profile
Senya



Joined: 20 Jun 2011
Posts: 58

PostPosted: Mon Jul 02, 2012 3:32 am    Post subject: Reply with quote

I've made workaround, by moving Cray pointers out of module, but i think that this compiler error should not be left without care, because there is possible situation, when moving out of module is not possible.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group