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.5.1/] [gcc/] [testsuite/] [gnat.dg/] [loop_address2.adb] - Blame information for rev 304

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 304 jeremybenn
-- { dg-do compile }
2
-- { dg-options "-O" }
3
 
4
with System, Ada.Unchecked_Conversion;
5
with System.Storage_Elements; use System.Storage_Elements;
6
 
7
procedure Loop_Address2 is
8
 
9
  type Ptr is access all Integer;
10
 
11
  function To_Ptr is new Ada.Unchecked_Conversion (System.Address, Ptr);
12
 
13
  function F (BM : System.Address; I : Integer) return System.Address is
14
  begin
15
    return BM + Storage_Offset (4*I);
16
  end;
17
 
18
  B : Integer;
19
  P : Ptr;
20
 
21
begin
22
  for I in 0 .. 2 loop
23
    P := To_Ptr (F (B'Address, I));
24
    P.all := 0;
25
  end loop;
26
end ;

powered by: WebSVN 2.1.0

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