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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 696 jeremybenn
-- { dg-do compile }
2
-- { dg-options "-O" }
3
 
4
procedure Opt19 is
5
 
6
  type Enum is (One, Two);
7
 
8
  type Vector_T is array (Enum) of Integer;
9
 
10
  Zero_Vector : constant Vector_T := (Enum => 0);
11
 
12
  type T is record
13
    Vector : Vector_T;
14
  end record;
15
 
16
  procedure Nested (Value : in out T; E : Enum; B : out Boolean) is
17
    I : Integer renames Value.Vector(E);
18
  begin
19
    B := I /= 0;
20
  end;
21
 
22
  Obj : T := (Vector => Zero_Vector);
23
  B : Boolean;
24
 
25
begin
26
  Nested (Obj, One, B);
27
end;

powered by: WebSVN 2.1.0

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