Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gnat.dg/addr_slice.adb @ 127:4c56639505ff
fix function.c and add CbC-example Makefile
author | mir3636 |
---|---|
date | Wed, 11 Apr 2018 18:46:58 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
-- { 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;