https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98701
--- Comment #4 from Bahram.shahrooz at uc dot edu --- I compiled with the suggested options (below) and now the code gives the same result as g77. -fcheck=all -ffpe-trap=zero,invalid Things look good now! Sorry for starting this bug report prematurely, and many thanks for your help!!!