As already said, it is possible that the final result is numerically sensitive and optimization, which relaxes the arithmetic rules, is resulting in a numeric instability. Or optimization could be revealing a bug in the program. If the code is doing its own memory management (no longer necessary with Fortran 90/95/2003) with an internal array of ints, something could be going wrong different OS. I would investigate further...
I suggest turning on all warning and checking options. If there is a bug and you are lucky they might reveal it or give a clue. At least it is easy to try. Try these options:
-check all -traceback -warn all -fstack-protector
You could also try "-assume protect_parens", which will make ifort compliant with the Fortran standard, and see if that makes the problem go away.
Or maybe the program is assuming that memory is preallocated to some value. Is that a difference from Linux and Mac ?? I think that ifort has options to control this. If it is an old Fortran 77 code, it may assume that local variables are preserved across procedure calls, even without the use of "save" in the declarations. There is a compiler option to cause all local variables to act as if "save" were used -- see if that makes a difference.