Silverfrost Forums

Welcome to our forums

Support for VOLATILE statements

13 Jun 2025 11:21 #32156

Hi! I'm all new to ftn95. I have existing Fortran code that was originally written for OpenVMS, compiled with the VSI Fortran compiler. I have managed to compile the same Fortran code on Linux and Windows with gfortran. I'm now trying out ftn95 on Windows, but I'm struggling with getting it to accept my Fortran code. For various reasons, the code contains VOLATILE statements as such:

INTEGER*4 NUM001
VOLATILE NUM001

but I can't seem to find a command line switch that makes ftn95 accept this construct. The Fortran code is fixed format, using byte size KIND specifications, and I'm currently trying to compile it with

ftn95 /FIXED_FORMAT /ALT_KINDS
14 Jun 2025 6:05 #32158

The VOLATILE attribute is not currently implemented in FTN95 but I will add it to the wish list for the next full release of FTN95.

16 Jun 2025 8:27 #32165

I see, thank you!

17 Jun 2025 7:02 #32170

VOLATILE and ASYNCHRONOUS have now been added to FTN95 for the next release.

This is currently a minimal implementation in that these attributes are tollerated but have no consequences other than that VOLATILE inhibits optimisation.

Please login to reply.