This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]