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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c3/] [c37305a.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C37305A.ADA
2
 
3
--                             Grant of Unlimited Rights
4
--
5
--     Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
6
--     F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained 
7
--     unlimited rights in the software and documentation contained herein.
8
--     Unlimited rights are defined in DFAR 252.227-7013(a)(19).  By making 
9
--     this public release, the Government intends to confer upon all 
10
--     recipients unlimited rights  equal to those held by the Government.  
11
--     These rights include rights to use, duplicate, release or disclose the 
12
--     released technical data and computer software in whole or in part, in 
13
--     any manner and for any purpose whatsoever, and to have or permit others 
14
--     to do so.
15
--
16
--                                    DISCLAIMER
17
--
18
--     ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
19
--     DISCLOSED ARE AS IS.  THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED 
20
--     WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
21
--     SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE 
22
--     OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
23
--     PARTICULAR PURPOSE OF SAID MATERIAL.
24
--*
25
-- CHECK THAT CHOICES DENOTING A NULL RANGE OF VALUES ARE PERMITTED,
26
-- AND THAT FOR CHOICES CONSISTING OF A SUBTYPE NAME FOLLOWED BY A
27
-- RANGE CONSTRAINT WHERE THE LOWER BOUND IS GREATER THAN THE UPPER
28
-- BOUND, THE BOUNDS NEED NOT BE IN THE RANGE OF THE SUBTYPE VALUES.
29
 
30
-- CHECK THAT AN OTHERS ALTERNATIVE CAN BE PROVIDED EVEN IF ALL VALUES
31
-- OF THE CASE EXPRESSION HAVE BEEN COVERED BY PRECEDING ALTERNATIVES.
32
 
33
-- ASL 7/14/81
34
-- JWC 6/28/85   RENAMED TO -AB
35
 
36
WITH REPORT;
37
PROCEDURE C37305A IS
38
 
39
     USE REPORT;
40
 
41
BEGIN
42
     TEST ("C37305A","NULL RANGES ALLOWED IN CHOICES FOR VARIANT " &
43
           "PARTS.  OTHERS ALTERNATIVE ALLOWED AFTER ALL VALUES " &
44
           "PREVIOUSLY COVERED");
45
 
46
     DECLARE
47
          SUBTYPE ST IS INTEGER RANGE 1..10;
48
 
49
          TYPE REC(DISC : ST := 1) IS
50
               RECORD
51
                    CASE DISC IS
52
                         WHEN 0..-1 => NULL;
53
                         WHEN 1..-3 => NULL;
54
                         WHEN 6..5 =>
55
                              COMP : INTEGER;
56
                         WHEN 11..10 => NULL;
57
                         WHEN 15..12 => NULL;
58
                         WHEN 11..0 => NULL;
59
                         WHEN 1..10 => NULL;
60
                         WHEN OTHERS => NULL;
61
                    END CASE;
62
               END RECORD;
63
 
64
          R : REC;
65
     BEGIN
66
          R := (DISC => 4);
67
 
68
          IF EQUAL(3,4) THEN
69
               R := (DISC => 7);
70
          END IF;
71
 
72
          IF R.DISC /= 4 THEN
73
               FAILED ("ASSIGNMENT FAILED");
74
          END IF;
75
     EXCEPTION
76
          WHEN OTHERS =>
77
               FAILED ("EXCEPTION RAISED");
78
     END;
79
 
80
     RESULT;
81
 
82
END C37305A;

powered by: WebSVN 2.1.0

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