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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gnat.dg/] [addr6.adb] - Blame information for rev 304

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 304 jeremybenn
-- { dg-do compile }
2
 
3
procedure Addr6 is
4
 
5
   type Byte is mod 2**8;
6
 
7
   type Byte_Arr1 is array (Positive range <>) of Byte;
8
   for Byte_Arr1'Alignment use 4;
9
 
10
   type Byte_Arr2 is array (Positive range <>) of Byte;
11
 
12
   function Length return Natural is
13
   begin
14
     return 1;
15
   end;
16
 
17
   function Empty return Byte_Arr2 is
18
     Null_Arr : Byte_Arr2 (1 .. 0);
19
   begin
20
     return Null_Arr;
21
   end;
22
 
23
   A1 : Byte_Arr1 (1 .. Length);
24
 
25
   A2 : Byte_Arr2 (A1'Range);
26
   for A2'Alignment use 4;
27
   for A2'Address use A1'Address;
28
 
29
begin
30
   A2 := Empty;
31
end;

powered by: WebSVN 2.1.0

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