OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [secnds-1.f] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
C { dg-do run }
2
C Tests fix for PR29099 - SECNDS intrinsic wrong result with no delay.
3
C Note1: The test uses +/-20ms accuracy in the check that
4
C date_and_time and secnds give the same values.
5
C
6
C Contributed by Paul Thomas  <pault@gcc.gnu.org>
7
C
8
      character*20 dum1, dum2, dum3
9
      real t1, t2
10
      real dat1, dat2
11
      real dt
12
      integer i, j, values(8)
13
      dt = 40e-3
14
      t1 = secnds (0.0)
15
      call date_and_time (dum1, dum2, dum3, values)
16
      dat1 = 0.001*real (values(8)) + real (values(7)) +
17
     &        60.0*real (values(6)) + 3600.0* real (values(5))
18
      if (int ((dat1 - t1 + dt * 0.5) / dt) .ne. 0) call abort ()
19
      call date_and_time (dum1, dum2, dum3, values)
20
      dat2 = 0.001*real (values(8)) + real (values(7)) +
21
     &        60.0*real (values(6)) + 3600.0* real (values(5))
22
      t2 = secnds (t1)
23
      if (int ((dat1-dat2 + t2 + dt * 0.5) / dt) .ne. 0.0) call abort ()
24
      end

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.