OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C59002A.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 JUMPS OUT OF AN EXCEPTION HANDLER CONTAINED IN A BLOCK
26
--    TO A STATEMENT IN AN ENCLOSING UNIT ARE ALLOWED AND ARE PERFORMED 
27
--    CORRECTLY.
28
 
29
 
30
-- RM 05/22/81
31
-- SPS 3/8/83
32
 
33
WITH REPORT;
34
PROCEDURE  C59002A  IS
35
 
36
     USE  REPORT ;
37
 
38
BEGIN
39
 
40
     TEST( "C59002A" , "CHECK THAT JUMPS OUT OF EXCEPTION HANDLERS" &
41
                       " ARE ALLOWED" );
42
 
43
     DECLARE
44
 
45
          FLOW : INTEGER := 1 ;
46
          EXPON: INTEGER RANGE 0..3 := 0 ;
47
 
48
     BEGIN
49
 
50
          GOTO  START ;
51
 
52
          FAILED( "'GOTO' NOT OBEYED" );
53
 
54
          << BACK_LABEL >>
55
          FLOW  := FLOW  * 3**EXPON ;                    -- 1*5*9
56
          EXPON := EXPON + 1 ;
57
          GOTO  FINISH ;
58
 
59
          << START >>
60
          FLOW  := FLOW  * 7**EXPON ;                    -- 1
61
          EXPON := EXPON + 1 ;
62
 
63
          DECLARE
64
          BEGIN
65
               RAISE  CONSTRAINT_ERROR ;
66
               FAILED( "EXCEPTION NOT RAISED  -  1" );
67
          EXCEPTION
68
               WHEN CONSTRAINT_ERROR  =>
69
                    GOTO  FORWARD_LABEL ;
70
          END ;
71
 
72
          FAILED( "INNER 'GOTO' NOT OBEYED  -  1" );
73
 
74
          << FORWARD_LABEL >>
75
          FLOW  := FLOW  * 5**EXPON ;                    -- 1*5
76
          EXPON := EXPON + 1 ;
77
 
78
          DECLARE
79
          BEGIN
80
               RAISE  CONSTRAINT_ERROR ;
81
               FAILED( "EXCEPTION NOT RAISED  -  2" );
82
          EXCEPTION
83
               WHEN CONSTRAINT_ERROR  =>
84
                    GOTO  BACK_LABEL ;
85
          END ;
86
 
87
          FAILED( "INNER 'GOTO' NOT OBETED  -  2" );
88
 
89
          << FINISH >>
90
          FLOW  := FLOW  * 2**EXPON ;                    -- 1*5*9*8
91
 
92
          IF  FLOW /= 360  THEN
93
               FAILED( "WRONG FLOW OF CONTROL" );
94
          END IF;
95
 
96
     END ;
97
 
98
 
99
     RESULT ;
100
 
101
 
102
END C59002A;

powered by: WebSVN 2.1.0

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