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] - Rev 378

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

-- { dg-do run }
-- { dg-options "-O" }
 
procedure Array5 is
 
    type myint is range 0 .. 100_000;
    Bla : constant myint := 359;
 
    type my_array is array (1 .. 2) of myint;
 
    type item is record
       Length  : Integer;
       Content : my_array;
    end record;
 
    procedure create_item (M : out item) is
    begin
      M.Length := 1;
      M.Content := (others => Bla);
    end;
 
    Var : item;
 
begin
    create_item (Var);
 
    if Var.Length = 1
     and then Var.Content (1) = Bla
    then
      null;
    else
      raise Program_Error;
    end if;
end;
 

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

powered by: WebSVN 2.1.0

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