From 430b2815a3ef5f81bc860582f2f32eebbd4ee9cb Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Fri, 23 May 2008 14:35:05 +0000 Subject: [PATCH] * gnat.dg/addr_slice.adb: New test. From-SVN: r135814 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gnat.dg/addr_slice.adb | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 gcc/testsuite/gnat.dg/addr_slice.adb diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9397bb51472..7fedaf1ea12 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2008-05-23 Arnaud Charlet + + * gnat.dg/addr_slice.adb: New test. + 2008-05-23 Jakub Jelinek PR c++/36237 diff --git a/gcc/testsuite/gnat.dg/addr_slice.adb b/gcc/testsuite/gnat.dg/addr_slice.adb new file mode 100644 index 00000000000..2506148089e --- /dev/null +++ b/gcc/testsuite/gnat.dg/addr_slice.adb @@ -0,0 +1,19 @@ +-- { dg-do compile } +-- { dg-options "-gnatws" } + +procedure Addr_Slice is + type Item_Type is record + I : Integer; + end record; + + type Index_Type is (A, B); + for Index_Type use (A => 1, B => 10); + + Item_Array : constant array (Index_Type) of Item_Type + := (A => (I => 10), B => (I => 22)); + + Item : Item_Type; + for Item'Address use Item_Array(Index_Type)'Address; +begin + null; +end; -- 2.30.2