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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c3/] [c39007b.ada] - Blame information for rev 750

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

Line No. Rev Author Line
1 720 jeremybenn
-- C39007B.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
-- OBJECTIVE:
26
--     CHECK THAT PROGRAM_ERROR IS RAISED BY AN ATTEMPT TO INSTANTIATE
27
--     A GENERIC UNIT WHOSE BODY IS NOT YET ELABORATED.  USE A GENERIC
28
--     UNIT THAT IS DECLARED AND INSTANTIATED IN A PACKAGE
29
--     SPECIFICATION.
30
 
31
-- HISTORY:
32
--     BCB 08/01/88  CREATED ORIGINAL TEST.
33
 
34
WITH REPORT; USE REPORT;
35
 
36
PROCEDURE C39007B IS
37
 
38
BEGIN
39
     TEST ("C39007B", "CHECK THAT PROGRAM_ERROR IS RAISED BY AN " &
40
                      "ATTEMPT TO INSTANTIATE A GENERIC UNIT WHOSE " &
41
                      "BODY IS NOT YET ELABORATED.  USE A GENERIC " &
42
                      "UNIT THAT IS DECLARED AND INSTANTIATED IN A " &
43
                      "PACKAGE SPECIFICATION");
44
 
45
     DECLARE
46
     BEGIN
47
          DECLARE
48
               PACKAGE P IS
49
                    GENERIC
50
                    FUNCTION F RETURN BOOLEAN;
51
 
52
                    FUNCTION NEW_F IS NEW F;
53
               END P;
54
 
55
               PACKAGE BODY P IS
56
                    FUNCTION F RETURN BOOLEAN IS
57
                    BEGIN
58
                         RETURN TRUE;
59
                    END F;
60
               END P;
61
          BEGIN
62
               FAILED ("NO EXCEPTION RAISED");
63
               DECLARE
64
                    X : BOOLEAN := IDENT_BOOL(FALSE);
65
               BEGIN
66
                    X := P.NEW_F;
67
                    IF X /= IDENT_BOOL(TRUE) THEN
68
                         COMMENT ("NOT RELEVANT");
69
                    END IF;
70
               EXCEPTION
71
                    WHEN OTHERS =>
72
                         FAILED ("EXCEPTION RAISED TOO LATE");
73
               END;
74
          END;
75
     EXCEPTION
76
          WHEN PROGRAM_ERROR =>
77
               NULL;
78
          WHEN OTHERS =>
79
               FAILED ("OTHER EXCEPTION RAISED");
80
     END;
81
 
82
     RESULT;
83
END C39007B;

powered by: WebSVN 2.1.0

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