Silverfrost Forums

Welcome to our forums

Error 799

11 Dec 2013 5:17 #13444

My apologies if this is a silly error, but I am getting an unusual error message for the following code at line 3; the first executable statement:

FTN95/Win32 Ver. 6.35.0 *** Error 799: Compiler failure - unexpected type for tree argument

!  program to test
!
      integer*4 n
      real*8    mb
      real*8, allocatable, dimension(:,:) ::  a, b, c
!

      do n = 100, 2100, 500
!
        mb = n*n*3. / (2.**17)
        write (*,fmt='(a,i5,f8.2,a)') ' Test ',n, mb,' mb'
        allocate ( a(n,n) )
        allocate ( b(n,n) )
        allocate ( c(n,n) )
        write (*,*) 'Align A', mod (loc(a), 32)
        write (*,*) 'Align B', mod (loc(b), 32)
        write (*,*) 'Align C', mod (loc(c), 32)
!
        call Vec_Add_Test (n, a, b)
        call Vec_Sub_Test (n, a, b, c)

        deallocate ( c )
        deallocate ( b )
        deallocate ( a )

      end do
!
      write (*,*) 'End'
      end          

I can't see what I have done wrong !!

John

11 Dec 2013 7:33 #13446

It runs without error for me, using version 7.00 (32 bit windows).

11 Dec 2013 11:34 #13450

David, I have now tested it on FTN95 Ver 6.10.0 It works ok if I use /check but if I use /debug, /opt or no option I get error ( no 799) ?? Similar for the following example, which also successfully fixes the variable alignment problem, when compiled with /check ??

!  program to test 
! 
      integer*4 n, m, ka, kb, kc
      real*8    mb 
      real*8, allocatable, dimension(:,:) ::  a, b, c 
! 
      do n = 100, 2100, 500 
! 
        m  = n+1
        mb = n*m*3. / (2.**17) 
        write (*,fmt='(a,i5,f8.2,a)') ' Test ',n, mb,' mb' 
        allocate ( a(n,m) ) 
        allocate ( b(n,m) ) 
        allocate ( c(n,m) ) 
        write (*,*) 'Align A', mod (loc(a), 32) 
        write (*,*) 'Align B', mod (loc(b), 32) 
        write (*,*) 'Align C', mod (loc(c), 32) 
! 
        ka = 1 + ( 32 - mod (loc(a), 32) ) / 8
        kb = 1 + ( 32 - mod (loc(b), 32) ) / 8
        kc = 1 + ( 32 - mod (loc(c), 32) ) / 8
!
        call Vec_Sub_Test (n, a(ka,1), b(kb,1), c(kc,1) ) 

        deallocate ( c ) 
        deallocate ( b ) 
        deallocate ( a ) 

      end do 
! 
      write (*,*) 'End' 
      end

      subroutine Vec_Sub_Test (n, a, b, c ) 
      integer*4 :: n
      real*8    :: a(n,n), b(n,n), c(n,n) 
!
        write (*,*) 'Align A', mod (loc(a), 32) 
        write (*,*) 'Align B', mod (loc(b), 32) 
        write (*,*) 'Align C', mod (loc(c), 32) 
      end
11 Dec 2013 7:59 #13454

I see. It looks like a bug then.

11 Dec 2013 11:12 #13455

I'd like to know what a 'tree argument' is. I'm not aware of using these.

John

12 Dec 2013 5:42 #13457

There aren't any 'Tree arguments' in Fortran.

This is an internal compiler error. I suspect that a tree argument is related to the Abstract Syntax Tree used by the compiler. See

http://en.wikipedia.org/wiki/Abstract_syntax_tree

Will have to see what Paul makes of the error.

12 Dec 2013 7:50 #13459

I have now logged this for investigation.

13 Dec 2013 11:38 (Edited: 15 Dec 2013 11:29) #13467

Edit: I have found a simplified version of the error plus a work-around that identifies the problem is using LOC inside MOD. It appears to me that LOC is being treated differently from other PURE functions, such as INT in the expanded example.

integer*4 function align_32a (a) 
  integer*4 a, la
  la = loc (a)
  align_32a = mod (la, 32) 
end 
integer*4 function angle (deg_val)
  real*8 deg_val
  angle = mod ( int (deg_val), 360)
end
integer*4 function align_32 (a)
  integer*4 a
  align_32 = mod (loc (a), 32)
end

John

13 Dec 2013 4:08 #13470

Thanks

17 Mar 2014 1:20 #13855

This bug has been fixed for the next release.

19 Mar 2014 1:32 #13866

Paul,

Thanks for fixing this. I suppose that FTN95 no longer has tree arguments.

John

19 Mar 2014 8:25 #13871

The error report was equivalent to 'Internal compiler error'. An internal compiler tree had become corrupted.

Please login to reply.