[mod.computers.vax] Optional arguments, FORTRAN optimisation, etc.

SYSMGR%UK.AC.KCL.PH.IPG@AC.UK (01/07/87)

There is a little-known statement in the new(ish) DEC FORTRAN compiler which
you can use to stop compiler optimisations on a per-variable basis. The
statement is
		VOLATILE variable [,variable2...]

main use is to define variables which might get altered by an AST or because
they are directly or indirectly equivalenced to another variable, but it
could also be tried to prevent register-binding onto a variable which is an
optional routine argument checked for using %LOC(ARG) .EQ. 0

We did have code which broke when the VMS 4 fortran compiler arrived because
it did try to register-bind an optional argument, but the current compiler
version has un-broken it so I can't say if a VOLATILE declaration will help.

Nigel Arnot (Dept. Physics, Kings college, Univ. of London;  U.K)

Bitnet/NetNorth/Earn:   sysmgr@ipg.ph.kcl.ac.uk (or) sysmgr%kcl.ph.vaxa@ac.uk
       Arpa         :   sysmgr%ipg.ph.kcl.ac.uk@ucl-cs.arpa