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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 696 jeremybenn
with System, System.Storage_Elements;
2
use System.Storage_Elements;
3
 
4
package body Allocator_Maxalign2 is
5
 
6
   Max_Align : constant Storage_Offset := Standard'Maximum_Alignment;
7
 
8
   procedure Validate is
9
      use type System.Address;
10
   begin
11
      if Addr mod Max_Align /= 0 then
12
         raise Program_Error;
13
      end if;
14
   end;
15
 
16
   procedure Check is
17
      I : Integer;
18
      B : Block;
19
      type Block_Access is access all Block;
20
      A : Block_Access;
21
   begin
22
      Addr := I'Address;
23
      Addr := B'Address;
24
      Validate;
25
      for I in 1 .. 50 loop
26
         A := new Block;
27
         Addr := A.all'Address;
28
         Validate;
29
      end loop;
30
 
31
   end;
32
 
33
end;

powered by: WebSVN 2.1.0

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