View previous topic :: View next topic |
Author |
Message |
Emanuele
Joined: 21 Oct 2009 Posts: 77 Location: Bologna (Italy)
|
Posted: Sun Jul 04, 2021 5:36 pm Post subject: Error 1017 |
|
|
When I try recompiling an old project to create a .dll for .NET, I get the following error for few subroutines:
"error 1017: Cannot yet process records of type force_temporary in CLR mode"
Line reference is to the sub declaration.
What does this error refer to? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7932 Location: Salford, UK
|
Posted: Mon Jul 05, 2021 6:52 am Post subject: |
|
|
Emanuele
This is an internal compiler error. We would need some Fortran code that generates this error in order to comment further. |
|
Back to top |
|
|
Emanuele
Joined: 21 Oct 2009 Posts: 77 Location: Bologna (Italy)
|
Posted: Wed Jul 07, 2021 10:54 am Post subject: |
|
|
Thanks Paul, I am trying to isolate the problem, since the code is composed by many routines... |
|
Back to top |
|
|
Emanuele
Joined: 21 Oct 2009 Posts: 77 Location: Bologna (Italy)
|
Posted: Wed Jul 07, 2021 10:36 pm Post subject: |
|
|
I managed to reproduce the error with these lines of code:
Code: | subroutine test (avis)
real avis, alti, re, gam
alti=35785.845
re=6378.155
gam=0.1
avis=asin((1.+alti/re)*(gam))
return
end |
I'm working on VS2019 with FTN95 8.70 PE. Compiler switches as follows:
/DEBUG /CHECK /FULL_DEBUG /WIDE_SOURCE /STANDARD_ERROR_REPORTS /SINGLE_THREADED /FPP /CLR /CLR_VER 4
The problem seems to be related with the asin() function.
Thanks for your help. |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1888
|
Posted: Thu Jul 08, 2021 7:42 am Post subject: |
|
|
Emanuele:
The bug is also present in Version 8.75. Here is a work-around for now.
Code: | subroutine test (avis)
real, intent(out) :: avis
real alti, re, gam, arg
alti=35785.845e0
re=6378.155
gam=0.1
arg = (1.+alti/re)*(gam)
avis=asin(arg)
return
end |
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7932 Location: Salford, UK
|
Posted: Thu Jul 08, 2021 7:45 am Post subject: |
|
|
Emanuele
The quick fix for this failure is to remove the brackets from (gam) on line 7...
Code: | avis=asin((1.+alti/re)*gam) |
|
|
Back to top |
|
|
Emanuele
Joined: 21 Oct 2009 Posts: 77 Location: Bologna (Italy)
|
Posted: Thu Jul 08, 2021 11:21 am Post subject: |
|
|
Thank you very much guys! I never would have guessed it!
I am a bit scared because potentially there can be dozens of such situations in the original code!
A curiosity: is it possible that in older versions this bug was not present?
Thanks again. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7932 Location: Salford, UK
|
Posted: Thu Jul 08, 2021 12:57 pm Post subject: |
|
|
Emanuele
Yes it is quite possible that this would not have failed with earlier versions. |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1888
|
Posted: Thu Jul 08, 2021 2:15 pm Post subject: Re: |
|
|
Emanuele wrote: | A curiosity: is it possible that in older versions this bug was not present? |
The error does not occur with FTN95 7.2 (32-bit only). This finding agrees with what Paul said.
When the bug bites, you get an error message, don't you? Therefore, there is no reason to worry, unless you see some indication that an apparently successful compilation has produced bad code. |
|
Back to top |
|
|
|