OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gnat.dg/] [conv_real.adb] - Blame information for rev 700

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 696 jeremybenn
-- { dg-do run }
2
 
3
with Interfaces; use Interfaces;
4
procedure Conv_Real is
5
   Small : constant := 10.0**(-9);
6
   type Time_Type is delta Small range -2**63 * Small .. (2**63-1) * Small;
7
   for Time_Type'Small use Small;
8
   for Time_Type'Size use 64;
9
   procedure Cache (Seconds_Per_GDS_Cycle : in Time_Type) is
10
      Cycles_Per_Second : constant Time_Type  := (1.0 / Seconds_Per_GDS_Cycle);
11
   begin
12
      if Integer_32 (Seconds_Per_GDS_Cycle * Cycles_Per_Second) /= 1 then
13
         raise Program_Error;
14
      end if;
15
   end Cache;
16
begin
17
   Cache (0.035);
18
end;

powered by: WebSVN 2.1.0

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