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

Subversion Repositories openrisc

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

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 "-O2" }
3
 
4
PROCEDURE Array8 IS
5
 
6
  function ID (I : Integer) return Integer is
7
  begin
8
    return I;
9
  end;
10
 
11
  SUBTYPE STB IS INTEGER RANGE ID(-8) .. -5;
12
 
13
  TYPE TB IS ARRAY (STB RANGE <>) OF INTEGER;
14
 
15
  GENERIC
16
    B1 : TB;
17
  PROCEDURE PROC1;
18
 
19
  PROCEDURE PROC1 IS
20
  BEGIN
21
    IF B1'FIRST /= -8 THEN
22
      raise Program_Error;
23
    ELSIF B1'LAST /= ID(-5) THEN
24
      raise Program_Error;
25
    ELSIF B1 /= (7, 6, 5, 4) THEN
26
      raise Program_Error;
27
    END IF;
28
  END;
29
 
30
  PROCEDURE PROC2 IS NEW PROC1 ((7, 6, ID(5), 4));
31
 
32
BEGIN
33
  PROC2;
34
END;

powered by: WebSVN 2.1.0

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