When code output changes like this it often means you have a code problem.
My interpretation is that when the code is compiled it is packed into memory with variables adjacent to each other in a certain way. When you add the compiler flag, additional code is packed in during the compilation to do the bounds checking or whatever. This re-orders the code in memory.
Now, lets say your code has an error where it writes a variable outside its memory address. What it overwrites will change under the two different compile cases. In one case it might overwrite something no longer needed, with no ill effect, and in the other case it might overwrite its own loop counter variable, ruining the output.
I think the flag you want is “-fbounds-check” not “-fbounds=check”. So not sure that your code is actually checking for out-of-bounds situations.
If your common blocks hold huge amounts of data (over 2GB), you may be exceeding the total allocated space capacity.
See for example the -mcmodel=medium or =large flag
Link:
https://software.intel.com/en-us/node/691767
R
> --
> You received this message because you are subscribed to the Google Groups "GNU Fortran" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
gnu-fortran...@googlegroups.com.
> To post to this group, send email to
gnu-f...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/gnu-fortran.
> For more options, visit
https://groups.google.com/d/optout.