OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gnat.dg/] [slice5.adb] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 696 jeremybenn
--  { dg-do compile }
2
--  { dg-options "-gnatwr" }
3
 
4
procedure Slice5 is
5
 
6
   type Item_Type is record
7
      I : Integer;
8
   end record;
9
 
10
   type Index_Type is (A, B);
11
 
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" }
16
 
17
   Item_Array : constant array (Index_Type) of Item_Type
18
     := (A => (I => 10), B => (I => 22));
19
 
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;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.