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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 696 jeremybenn
package body Opt13_Pkg is
2
 
3
  subtype Index_Type is Natural range 0 .. 16;
4
 
5
  type Arr is array (Index_Type range <>) of Integer;
6
 
7
  type Rec is record
8
    F1, F2, F3 : Float;
9
    N : Natural;
10
    B1, B2 : Boolean;
11
    F4 : Float;
12
  end record;
13
 
14
  type Data (D : Index_Type) is record
15
    A : Arr (1 .. D);
16
    R : Rec;
17
  end record;
18
 
19
  Zero : constant Rec := (0.0, 0.0, 0.0, 0, False, False, 0.0);
20
 
21
  procedure Allocate (T : out My_Type) is
22
  begin
23
    T := new Data (Index_Type'last);
24
    T.R := Zero;
25
 
26
    for I in 1 .. T.A'last loop
27
      N := 1;
28
    end loop;
29
  end;
30
 
31
end Opt13_Pkg;

powered by: WebSVN 2.1.0

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