diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-24 07:38:19 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-24 07:38:19 +0000 |
commit | b7459437aef76ee975ddd0e969077c7c1c77aa13 (patch) | |
tree | 3d61b51956e0e99640086b8707875344e2e74bbc /gcc/testsuite/gnat.dg/opt19.adb | |
parent | aca21847a28e296d86dae8f53863487378926c6d (diff) | |
download | gcc-b7459437aef76ee975ddd0e969077c7c1c77aa13.tar.gz |
2011-09-24 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 179138 using svnmerge.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@179139 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gnat.dg/opt19.adb')
-rw-r--r-- | gcc/testsuite/gnat.dg/opt19.adb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/opt19.adb b/gcc/testsuite/gnat.dg/opt19.adb new file mode 100644 index 00000000000..5619da12215 --- /dev/null +++ b/gcc/testsuite/gnat.dg/opt19.adb @@ -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; |