|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Fri Aug 01, 2014 4:22 am Post subject: |
|
|
I think there is a bug in FTN95 when using /check, that needs to be reviewed. With the USE of the module, the CONTAINS function F should not require an EXTERNAL, but the program fails with /check compilation option.
John |
|
Back to top |
|
|
davidb
Joined: 17 Jul 2009 Posts: 560 Location: UK
|
Posted: Fri Aug 01, 2014 10:04 pm Post subject: |
|
|
Can you give an example of the bug you are referring to John? _________________ Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Sat Aug 02, 2014 7:25 am Post subject: |
|
|
Davidb,
If you take the example I posted : Wed Jul 23, 2014 11:32 am (could be GMT +10hr) and remove the line 50 as : ! EXTERNAL F,C,U ; then you have an example where EXTERNAL should not be required as F, C and U are defined by being contained in M1 ( IMPLICIT NONE confirms this )
I interpreted Mecej4's comments as confirming this.
FTN95 simp.f90 /lgo and
FTN95 simp.f90 /debug /lgo both run successfully, but
FTN95 simp.f90 /check /lgo fails with an error report that I would suggest is wrong.
Using SDBG and hovering over the function names in "CALL SIMPSON (" does suggest that these functions are not real variables.
Also, the other use of EXTERNAL at line 26 also does not appear to be required for FTN95, as the use of F is interpreted as a function.
While I would consider the use of EXTERNAL in both cases to be unnecessary, I would still use it as it provides some clarity of definition of the use of these functions, as is my continued use of IMPLICIT NONE.
John |
|
Back to top |
|
|
davidb
Joined: 17 Jul 2009 Posts: 560 Location: UK
|
Posted: Sat Aug 02, 2014 2:27 pm Post subject: |
|
|
John,
You are correct. If there is a use statement which defines a function or subroutine, it is non-standard conforming to also use an external statement. It would be good if FTN95 could provide an error or warning about such cases but I would suggest there are other more important bugs to squash. _________________ Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl |
|
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
|