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/] [c37309a.ada] - Blame information for rev 309

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

Line No. Rev Author Line
1 294 jeremybenn
-- C37309A.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 IF A DISCRIMINANT HAS A STATIC SUBTYPE, AN OTHERS
26
-- CHOICE CAN BE OMITTED IF ALL VALUES IN THE 
27
-- SUBTYPE'S RANGE ARE COVERED IN A VARIANT PART.
28
 
29
-- ASL 7/10/81
30
-- SPS 10/25/82
31
-- SPS 7/17/83
32
 
33
WITH REPORT;
34
PROCEDURE C37309A IS
35
 
36
     USE REPORT;
37
 
38
BEGIN
39
     TEST ("C37309A","OTHERS CHOICE CAN BE OMITTED IN VARIANT PART " &
40
           "IF ALL VALUES IN STATIC SUBTYPE RANGE OF DISCRIMINANT " &
41
           "ARE COVERED");
42
 
43
     DECLARE
44
          SUBTYPE STATCHAR IS CHARACTER RANGE 'I'..'N';
45
          TYPE REC1(DISC : STATCHAR := 'J') IS
46
               RECORD
47
                    CASE DISC IS
48
                         WHEN 'I' => NULL;
49
                         WHEN 'J' => NULL;
50
                         WHEN 'K' => NULL;
51
                         WHEN 'L' => NULL;
52
                         WHEN 'M' => NULL;
53
                         WHEN 'N' => NULL;
54
                    END CASE;
55
               END RECORD;
56
 
57
          R1 : REC1;
58
     BEGIN
59
          R1 := (DISC => 'N');
60
          IF EQUAL(3,3) THEN
61
               R1 := (DISC => 'K');
62
          END IF;
63
          IF R1.DISC /= 'K' THEN
64
               FAILED ("ASSIGNMENT FAILED - 1");
65
          END IF;
66
 
67
     EXCEPTION
68
          WHEN OTHERS =>
69
               FAILED ("EXCEPTION RAISED");
70
     END;
71
 
72
     RESULT;
73
 
74
END C37309A;

powered by: WebSVN 2.1.0

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