* gnat.dg/opt19.adb: New test.
From-SVN: r179047
This commit is contained in:
parent
116b9c0785
commit
5da9694ccb
2 changed files with 31 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2011-09-21 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gnat.dg/opt19.adb: New test.
|
||||
|
||||
2011-09-21 Terry Guo <terry.guo@arm.com>
|
||||
|
||||
* gcc.target/arm/neon-thumb2-move.c: Skip the warning message
|
||||
|
|
27
gcc/testsuite/gnat.dg/opt19.adb
Normal file
27
gcc/testsuite/gnat.dg/opt19.adb
Normal file
|
@ -0,0 +1,27 @@
|
|||
-- { dg-do compile }
|
||||
-- { dg-options "-O" }
|
||||
|
||||
procedure Opt19 is
|
||||
|
||||
type Enum is (One, Two);
|
||||
|
||||
type Vector_T is array (Enum) of Integer;
|
||||
|
||||
Zero_Vector : constant Vector_T := (Enum => 0);
|
||||
|
||||
type T is record
|
||||
Vector : Vector_T;
|
||||
end record;
|
||||
|
||||
procedure Nested (Value : in out T; E : Enum; B : out Boolean) is
|
||||
I : Integer renames Value.Vector(E);
|
||||
begin
|
||||
B := I /= 0;
|
||||
end;
|
||||
|
||||
Obj : T := (Vector => Zero_Vector);
|
||||
B : Boolean;
|
||||
|
||||
begin
|
||||
Nested (Obj, One, B);
|
||||
end;
|
Loading…
Add table
Reference in a new issue