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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 696 jeremybenn
-- { dg-do run }
2
 
3
with Text_IO; use Text_IO;
4
procedure Named_Test is
5
   type Base is tagged limited record
6
      Flag  : boolean;
7
      Value : integer;
8
   end record;
9
-- 
10
   function Build (X : Integer; Y : Integer) return Base is
11
   begin
12
      return Result : Base do
13
         Result.Flag := (X = Y);
14
         Result.Value := X * Y;
15
      end return;
16
   end;
17
-- 
18
   type Table is array (1..1) of Base;
19
   It : Table := (1 => Build ( Y => 17, X => 11));
20
begin
21
  if It (1).Flag
22
    or else It (1).Value /= 187
23
  then
24
     raise Program_Error;
25
  end if;
26
end;

powered by: WebSVN 2.1.0

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