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/] [array5.adb] - Blame information for rev 304

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 304 jeremybenn
-- { dg-do run }
2
-- { dg-options "-O" }
3
 
4
procedure Array5 is
5
 
6
    type myint is range 0 .. 100_000;
7
    Bla : constant myint := 359;
8
 
9
    type my_array is array (1 .. 2) of myint;
10
 
11
    type item is record
12
       Length  : Integer;
13
       Content : my_array;
14
    end record;
15
 
16
    procedure create_item (M : out item) is
17
    begin
18
      M.Length := 1;
19
      M.Content := (others => Bla);
20
    end;
21
 
22
    Var : item;
23
 
24
begin
25
    create_item (Var);
26
 
27
    if Var.Length = 1
28
     and then Var.Content (1) = Bla
29
    then
30
      null;
31
    else
32
      raise Program_Error;
33
    end if;
34
end;

powered by: WebSVN 2.1.0

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