mirror of git://gcc.gnu.org/git/gcc.git
parent
116b9c0785
commit
5da9694ccb
|
@ -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>
|
2011-09-21 Terry Guo <terry.guo@arm.com>
|
||||||
|
|
||||||
* gcc.target/arm/neon-thumb2-move.c: Skip the warning message
|
* gcc.target/arm/neon-thumb2-move.c: Skip the warning message
|
||||||
|
|
|
@ -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…
Reference in New Issue