This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/23380] [mingw32] cpu_time intrinsic malfunction
- From: "kargl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Aug 2005 16:48:53 -0000
- Subject: [Bug libfortran/23380] [mingw32] cpu_time intrinsic malfunction
- References: <20050813214828.23380.edunlop@utvinternet.ie>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From kargl at gcc dot gnu dot org 2005-08-14 16:48 -------
(In reply to comment #3)
> I don't know why you say that "MingW claims to have a HAVE_TIMES".
> It doesn't.
>
Read the code for __cpu_time_1. The only way that cpu_time can return
zero is if HAVE_TIMES is defined or if MingW has getrusage() and
getrusage is broken.
> Would an ifdef _WIN32 clause be acceptable in cpu_time.c.
IMO, no. There are no other _WIN32 clauses in gfortran. As soon as
you add the first one, there will be a proliferation of OS specific
clauses in gfortran.
What we need to understand is why cpu_time isn't returning -1, which
is standard conforming. So, does config.h contain HAVE_GETRUSAGE
or HAVE_TIMES defined?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23380