PERRONNET Alain wrote:
My program and subroutines are mainly written in fortran 77 with blanck common of different sizes.
If the program and subroutines are compiled with the option -g the load-module is OK. if the program and subroutines are compiled with the option -O the execution of the load-module gives errors.
The question is not appropriate for gcc@ mailing list, which is about the development of GCC and not its usage. The gcc-help@ or the fortran@ lists would be more appropriate.
I have to admit that I have no idea why you get different results for -g and -O.
Additionally, it is unclear to me whether you get an error message of the compiler or whether your program fails at run time.
Especially, if it is the former: Can you provide more information? For instance, a small test case, the exact compiler options you used, the error messages you get and the result you expect.
If the latter, try the flag -fno-align-commons. (See description at http://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html) For a per-version overview about the compiler changes, search for "common" at http://gcc.gnu.org/wiki/GFortran#news
Tobias