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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c8/] [c87b34c.ada] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C87B34C.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 OVERLOADING RESOLUTION USES THE RULE THAT:
26
 
27
-- FOR A MEMBERSHIP RELATION WITH A TYPEMARK, THE TYPE OF THE
28
-- SIMPLE EXPRESSION MUST BE THE BASE TYPE OF THE TYPEMARK.
29
 
30
-- TRH  15 SEPT 82
31
-- PWN 01/31/95  REMOVED INCONSISTENCIES WITH ADA 9X.
32
 
33
WITH REPORT; USE REPORT;
34
 
35
PROCEDURE C87B34C IS
36
 
37
     TYPE VOWEL IS (A, E, I, O, U, VOCALIC_Y);
38
     TYPE ALPHA IS (A, 'A');
39
     TYPE GRADE IS (A, B, C, D, F);
40
     SUBTYPE BAD_GRADE IS GRADE RANGE D .. F;
41
     SUBTYPE PASSING   IS GRADE RANGE A .. C;
42
 
43
     GENERIC
44
          TYPE T IS PRIVATE;
45
          ARG  : IN T;
46
     FUNCTION F1 RETURN T;
47
 
48
     FUNCTION F1 RETURN T IS
49
     BEGIN
50
          FAILED ("RESOLUTION INCORRECT - EXPRESSION IN MEMBER" &
51
                  "SHIP TEST WITH TYPEMARK MUST MATCH TYPEMARK");
52
          RETURN ARG;
53
     END F1;
54
 
55
     FUNCTION F IS NEW F1 (CHARACTER, 'A');
56
     FUNCTION F IS NEW F1 (DURATION,  1.0);
57
     FUNCTION F IS NEW F1 (INTEGER,   -10);
58
     FUNCTION F IS NEW F1 (BOOLEAN,   TRUE);
59
     FUNCTION F IS NEW F1 (FLOAT,     1.0);
60
     FUNCTION F IS NEW F1 (VOWEL,     A);
61
     FUNCTION F IS NEW F1 (ALPHA,     A);
62
 
63
BEGIN
64
     TEST ("C87B34C","OVERLOADED EXPRESSION IN MEMBERSHIP TEST " &
65
           "WITH A TYPEMARK");
66
 
67
     IF (F NOT IN GRADE) OR (F NOT IN BAD_GRADE)
68
          OR (F IN PASSING) THEN
69
          FAILED ("RESOLUTION INCORRECT FOR MEMBERSHIP TEST " &
70
                  "WITH TYPEMARK");
71
     END IF;
72
 
73
     RESULT;
74
 
75
END C87B34C;

powered by: WebSVN 2.1.0

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