 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Wed Dec 11, 2013 6:17 am Post subject: Error 799 |
|
|
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
Code: | ! 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 |
|
Back to top |
|
 |
davidb
Joined: 17 Jul 2009 Posts: 560 Location: UK
|
Posted: Wed Dec 11, 2013 8:33 am Post subject: |
|
|
It runs without error for me, using version 7.00 (32 bit windows). _________________ Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl |
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Wed Dec 11, 2013 12:34 pm Post subject: |
|
|
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 ??
Code: | ! 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
|
|
|
Back to top |
|
 |
davidb
Joined: 17 Jul 2009 Posts: 560 Location: UK
|
Posted: Wed Dec 11, 2013 8:59 pm Post subject: |
|
|
I see.
It looks like a bug then. _________________ Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl |
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Thu Dec 12, 2013 12:12 am Post subject: |
|
|
I'd like to know what a "tree argument" is. I'm not aware of using these.
John |
|
Back to top |
|
 |
davidb
Joined: 17 Jul 2009 Posts: 560 Location: UK
|
Posted: Thu Dec 12, 2013 6:42 am Post subject: |
|
|
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. _________________ Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Thu Dec 12, 2013 8:50 am Post subject: |
|
|
I have now logged this for investigation. |
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Fri Dec 13, 2013 12:38 pm Post subject: |
|
|
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.
Code: | 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
Last edited by JohnCampbell on Mon Dec 16, 2013 12:29 am; edited 1 time in total |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Fri Dec 13, 2013 5:08 pm Post subject: |
|
|
Thanks |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Mon Mar 17, 2014 2:20 pm Post subject: |
|
|
This bug has been fixed for the next release. |
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Wed Mar 19, 2014 2:32 am Post subject: |
|
|
Paul,
Thanks for fixing this. I suppose that FTN95 no longer has tree arguments.
John |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Wed Mar 19, 2014 9:25 am Post subject: |
|
|
The error report was equivalent to "Internal compiler error".
An internal compiler tree had become corrupted. |
|
Back to top |
|
 |
|
|
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 © 2001, 2005 phpBB Group
|