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/] [a/] [a83a08a.ada] - Blame information for rev 316

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

Line No. Rev Author Line
1 294 jeremybenn
-- A83A08A.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
--     A STATEMENT LABEL DECLARED OUTSIDE A BLOCK CAN HAVE THE SAME
27
--     IDENTIFIER AS AN ENTITY DECLARED IN THE BLOCK, AND A GOTO
28
--     STATEMENT USING THE LABEL IS LEGAL OUTSIDE THE BLOCK.
29
 
30
-- HISTORY:
31
--     PMW 09/20/88  CREATED ORIGINAL TEST.
32
 
33
WITH REPORT;  USE REPORT;
34
WITH SYSTEM;
35
 
36
PROCEDURE A83A08A IS
37
 
38
     PASSES : INTEGER := 0;
39
 
40
BEGIN
41
     TEST ("A83A08A", "A STATEMENT LABEL DECLARED OUTSIDE A BLOCK " &
42
                      "CAN HAVE THE SAME IDENTIFIER AS AN ENTITY " &
43
                      "DECLARED IN THE BLOCK, AND A GOTO STATEMENT " &
44
                      "USING THE LABEL IS LEGAL OUTSIDE THE BLOCK");
45
 
46
     GOTO LBLS;
47
 
48
     <<LBL>>
49
 
50
     DECLARE
51
          LBL : INTEGER := 1;
52
     BEGIN
53
          LBL := IDENT_INT (LBL);
54
          PASSES := PASSES + 1;
55
     END;
56
 
57
     <<LBLS>>
58
 
59
     BEGIN
60
          DECLARE
61
               TYPE STUFF IS (LBL, LBL_ONE, LBL_TWO);
62
               ITEM : STUFF := LBL;
63
 
64
               FUNCTION LBLS (ITEM : STUFF) RETURN BOOLEAN IS
65
               BEGIN
66
                    <<LBL_2>>
67
                    CASE ITEM IS
68
                         WHEN LBL => RETURN TRUE;
69
                         WHEN LBL_ONE => PASSES := PASSES + 1;
70
                         WHEN LBL_TWO => RETURN FALSE;
71
                    END CASE;
72
                    IF PASSES < 2 THEN
73
                         PASSES := PASSES + 1;
74
                         GOTO LBL_2;
75
                    ELSE
76
                         RETURN TRUE;
77
                    END IF;
78
               END LBLS;
79
 
80
          BEGIN
81
               CASE PASSES IS
82
                    WHEN 0 => ITEM := LBL;
83
                    WHEN 1 => ITEM := LBL_ONE;
84
                    WHEN OTHERS => ITEM := LBL_TWO;
85
               END CASE;
86
               IF NOT LBLS (ITEM) THEN
87
                    COMMENT ("IRRELEVANT");
88
               END IF;
89
          END;
90
     END;
91
 
92
 
93
     IF PASSES > 1 THEN
94
          GOTO ENOUGH;
95
     END IF;
96
     GOTO LBL;
97
 
98
     <<ENOUGH>>
99
 
100
     RESULT;
101
 
102
END A83A08A;

powered by: WebSVN 2.1.0

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