RISC-V: Add support for riscv-*-*.
[official-gcc.git] / gcc / testsuite / gnat.dg / slice5.adb
blobc619b2f60ab65dc51f2c08c5de73b32d93a17c0e
1 -- { dg-do compile }
2 -- { dg-options "-gnatwr" }
4 procedure Slice5 is
6 type Item_Type is record
7 I : Integer;
8 end record;
10 type Index_Type is (A, B);
12 type table is array (integer range <>) of integer;
13 subtype Small is Integer range 1 .. 10;
14 T1 : constant Table (Small) := (Small => 0);
15 T2 : constant Table (Small) := T1 (Small); -- { dg-warning "redundant slice denotes whole array" }
17 Item_Array : constant array (Index_Type) of Item_Type
18 := (A => (I => 10), B => (I => 22));
20 Item : Item_Type;
21 for Item'Address use Item_Array(Index_Type)'Address; -- { dg-warning "redundant slice denotes whole array" }
22 begin
23 null;
24 end;