[Bug fortran/64432] [5 Regression] SYSTEM_CLOCK(COUNT_RATE=rate) wrong result for integer(4)::rate

anlauf at gmx dot de gcc-bugzilla@gcc.gnu.org
Mon Dec 29 15:23:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64432

--- Comment #6 from Harald Anlauf <anlauf at gmx dot de> ---
(In reply to Harald Anlauf from comment #5)
> Also, the presence of a second argument (see comment #1) should
> not change the behavior.

To make that explicit:

% cat gfcbug128c.f90
program gfcbug128c
  integer(4) :: count_rate, count_max
  call system_clock (count_rate=count_rate,count_max=count_max)
  print *, count_rate, count_max
  call system_clock (count_rate=count_rate)
  call system_clock (count_max=count_max)
  print *, count_rate, count_max
end

gfortran 5 gives:

        1000  2147483647
     1000000  2147483647

any other compiler:

        1000  2147483647
        1000  2147483647

I'd have a hard time to explain that to anybody.



More information about the Gcc-bugs mailing list