gfortran option -fno-automatic and -finit-local-zero
Chase, Jeffrey G. (IS) (Contr)
Jeffrey.G.Chase@ngc.com
Wed Jun 18 15:51:00 GMT 2014
Hello,
First of all thanks so much for all your hard work! I'm compiling a bunch of legacy fortran that relies on SAVE semantics from relic compilers. I'm using the -fno-automatic option to replicate that behavior. I also was using the -finit-local-zero option, assuming that it would initialize local variables upon first use, and then save their values in subsequent calls due to the -fno-automatic option. However, I found that -finit-local-zero would initialize local variables to zero upon each subroutine call regardless of whether -fno-automatic was used or not. I don't know if this is expected behavior, but I thought you may want to mention it in the gfortran man page.
Thanks again!
-Jeff Chase
More information about the Gcc
mailing list