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/] [cb/] [cb3003b.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- CB3003B.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 A NON-EXPLICIT RAISE STATEMENT MAY APPEAR IN A BLOCK
26
-- STATEMENT WITHIN AN EXCEPTION HANDLER; IF THE BLOCK STATEMENT
27
-- INCLUDES A HANDLER FOR THE CURRENT EXCEPTION, THEN THE INNER
28
-- HANDLER RECEIVES CONTROL.
29
 
30
-- *** NOTE: This test has been modified since ACVC version 1.11 to    -- 9X
31
-- ***       remove incompatibilities associated with the transition   -- 9X
32
-- ***       to Ada 9X.                                                -- 9X
33
-- ***                                                                 -- 9X
34
 
35
-- L.BROWN  10/08/86
36
-- MRM  03/30/93   REMOVED NUMERIC_ERROR FOR 9X COMPATIBILITY
37
 
38
WITH REPORT; USE REPORT;
39
 
40
PROCEDURE  CB3003B  IS
41
 
42
     MY_ERROR : EXCEPTION;
43
 
44
BEGIN
45
     TEST("CB3003B","A NON-EXPLICIT RAISE STATEMENT MAY APPEAR IN A "&
46
                    "BLOCK STATEMENT WITHIN AN EXCEPTION HANDLER");
47
 
48
     BEGIN
49
          BEGIN
50
               IF EQUAL(3,3) THEN
51
                    RAISE MY_ERROR;
52
               END IF;
53
               FAILED("MY_ERROR WAS NOT RAISED 1");
54
          EXCEPTION
55
               WHEN MY_ERROR =>
56
                    BEGIN
57
                         IF EQUAL(3,3) THEN
58
                              RAISE;
59
                         END IF;
60
                         FAILED("MY_ERROR WAS NOT RAISED 2");
61
                    EXCEPTION
62
                         WHEN MY_ERROR =>
63
                              NULL;
64
                         WHEN OTHERS =>
65
                              FAILED("WRONG EXCEPTION RAISED 1");
66
                    END;
67
               WHEN OTHERS =>
68
                    FAILED("WRONG EXCEPTION RAISED 2");
69
          END;
70
     EXCEPTION
71
          WHEN MY_ERROR =>
72
               FAILED("CONTROL PASSED TO OUTER HANDLER 1");
73
          WHEN OTHERS =>
74
               FAILED("UNEXPECTED EXCEPTION RAISED 1");
75
     END;
76
 
77
     BEGIN
78
          BEGIN
79
               IF EQUAL(3,3) THEN
80
                    RAISE MY_ERROR;
81
               END IF;
82
               FAILED("MY_ERROR WAS NOT RAISED 3");
83
          EXCEPTION
84
               WHEN CONSTRAINT_ERROR | MY_ERROR | TASKING_ERROR =>
85
                    BEGIN
86
                         IF EQUAL(3,3) THEN
87
                              RAISE;
88
                         END IF;
89
                         FAILED("MY_ERROR WAS NOT RAISED 4");
90
                    EXCEPTION
91
                         WHEN MY_ERROR =>
92
                              NULL;
93
                         WHEN OTHERS =>
94
                              FAILED("WRONG EXCEPTION RAISED 3");
95
                    END;
96
               WHEN OTHERS =>
97
                    FAILED("WRONG EXCEPTION RAISED 4");
98
          END;
99
     EXCEPTION
100
          WHEN MY_ERROR =>
101
               FAILED("CONTROL PASSED TO OUTER HANDLER 2");
102
          WHEN OTHERS =>
103
               FAILED("UNEXPECTED EXCEPTION RAISED 2");
104
     END;
105
 
106
     BEGIN
107
          BEGIN
108
               IF EQUAL(3,3) THEN
109
                    RAISE MY_ERROR;
110
               END IF;
111
               FAILED("MY_ERROR WAS NOT RAISED 5");
112
          EXCEPTION
113
               WHEN OTHERS =>
114
                    BEGIN
115
                         IF EQUAL(3,3) THEN
116
                              RAISE;
117
                         END IF;
118
                         FAILED("MY_ERROR WAS NOT RAISED 6");
119
                    EXCEPTION
120
                         WHEN MY_ERROR =>
121
                              NULL;
122
                         WHEN OTHERS =>
123
                              FAILED("WRONG EXCEPTION RAISED 5");
124
                    END;
125
          END;
126
     EXCEPTION
127
          WHEN MY_ERROR =>
128
               FAILED("CONTROL PASSED TO OUTER HANDLER 3");
129
          WHEN OTHERS =>
130
               FAILED("UNEXPECTED EXCEPTION RAISED 3");
131
     END;
132
 
133
     RESULT;
134
 
135
END CB3003B;

powered by: WebSVN 2.1.0

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