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]

Re: fortran fixes?


>>>>> "Jeffrey" == Jeffrey A Law <law@hurl.cygnus.com> writes:

 Jeffrey> Which direction are you referring to?

 Jeffrey> egcs fixes -> g77

 Jeffrey> or

 Jeffrey> g77 fixes -> egcs

The latter, thanks.

This isn't currently in ~fortran/dev but could save confusion for
others timing Fortran code on most platforms.

1997-09-19  Dave Love  <d.love@dl.ac.uk>

	* libU77/dtime_.c (G77_dtime_0): Fix types in HAVE_GETRUSAGE case
 	so as not to truncate results to integer values.

cvs diff: Diffing f/runtime/libU77
Index: f/runtime/libU77/Version.c
===================================================================
RCS file: /home/fx/CVSROOT/g77/f/runtime/libU77/Version.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 Version.c
*** Version.c	1997/09/17 11:36:37	1.1.1.1
--- Version.c	1997/09/19 17:50:42
***************
*** 1,6 ****
! static char junk[] = "\n@(#) LIBU77 VERSION 19970609\n";
  
! char __G77_LIBU77_VERSION__[] = "0.5.21";
  
  #include <stdio.h>
  
--- 1,6 ----
! static char junk[] = "\n@(#) LIBU77 VERSION 19970919\n";
  
! char __G77_LIBU77_VERSION__[] = "0.5.22-970919";
  
  #include <stdio.h>
  
Index: f/runtime/libU77/dtime_.c
===================================================================
RCS file: /home/fx/CVSROOT/g77/f/runtime/libU77/dtime_.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 dtime_.c
*** dtime_.c	1997/09/17 11:36:39	1.1.1.1
--- dtime_.c	1997/09/19 17:48:29
***************
*** 43,63 ****
  double G77_dtime_0 (real tarray[2])
  #endif
  {
-   time_t utime, stime;
-   static time_t old_utime = 0, old_stime = 0;
    /* The getrusage version is only the default for convenience. */
  #ifdef HAVE_GETRUSAGE
    struct rusage rbuff;
  
     if (getrusage (RUSAGE_SELF, &rbuff) != 0)
       abort ();
!    utime = ((float) (rbuff.ru_utime).tv_sec +
! 	   (float) (rbuff.ru_utime).tv_usec/1000000.0);
     tarray[0] = utime - (float) old_utime;
!    stime = ((float) (rbuff.ru_stime).tv_sec +
! 	   (float) (rbuff.ru_stime).tv_usec/1000000.0);
    tarray[1] = stime - old_stime;
  #else  /* HAVE_GETRUSAGE */
    struct tms buffer;
  
  /* NeXTStep seems to define _SC_CLK_TCK but not to have sysconf;
--- 43,65 ----
  double G77_dtime_0 (real tarray[2])
  #endif
  {
    /* The getrusage version is only the default for convenience. */
  #ifdef HAVE_GETRUSAGE
+   float utime, stime;
+   static float old_utime = 0.0, old_stime = 0.0;
    struct rusage rbuff;
  
     if (getrusage (RUSAGE_SELF, &rbuff) != 0)
       abort ();
!    utime = (float) (rbuff.ru_utime).tv_sec +
! 	   (float) (rbuff.ru_utime).tv_usec/1000000.0;
     tarray[0] = utime - (float) old_utime;
!    stime = (float) (rbuff.ru_stime).tv_sec +
! 	   (float) (rbuff.ru_stime).tv_usec/1000000.0;
    tarray[1] = stime - old_stime;
  #else  /* HAVE_GETRUSAGE */
+   time_t utime, stime;
+   static time_t old_utime = 0, old_stime = 0;
    struct tms buffer;
  
  /* NeXTStep seems to define _SC_CLK_TCK but not to have sysconf;



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