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/] [c3/] [c36304a.ada] - Blame information for rev 309

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

Line No. Rev Author Line
1 294 jeremybenn
-- C36304A.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 BOUNDS OF CONSTANT STRING OBJECTS IF NOT GIVEN IN
26
-- THE DECLARATIONS ARE DETERMINED BY THE STRINGS' INITIAL VALUES.
27
 
28
-- DAT 2/17/81
29
-- JBG 8/21/83
30
 
31
WITH REPORT;
32
PROCEDURE C36304A IS
33
 
34
     USE REPORT;
35
 
36
     I3 : INTEGER := IDENT_INT (3);
37
 
38
     S3 : CONSTANT STRING := "ABC";
39
     S0 : CONSTANT STRING := "";
40
     S1 : CONSTANT STRING := "A";
41
     S2 : CONSTANT STRING := "AB";
42
     S5 : CONSTANT STRING := "ABCDE";
43
     S3A : CONSTANT STRING (I3 .. I3 + 2) := S3(I3 - 2 .. I3);
44
     S3C : CONSTANT STRING := S3A;
45
     S3D : CONSTANT STRING := S3C & "";
46
     S3E : CONSTANT STRING := S3D;
47
     X3 : CONSTANT STRING := (I3 .. 5 => 'X');
48
     Y3 : CONSTANT STRING := X3;
49
     Z0 : CONSTANT STRING := (-3..-5 => 'A');
50
 
51
     PROCEDURE C (S : STRING;
52
                  FIRST, LAST, LENGTH : INTEGER;
53
                  ID : STRING) IS
54
     BEGIN
55
          IF S'FIRST /= FIRST THEN
56
               FAILED ("'FIRST IS " & INTEGER'IMAGE(S'FIRST) &
57
                       " INSTEAD OF " & INTEGER'IMAGE(FIRST) &
58
                       " FOR " & ID);
59
          END IF;
60
 
61
          IF S'LAST /= LAST THEN
62
               FAILED ("'LAST IS " & INTEGER'IMAGE(S'LAST) &
63
                       " INSTEAD OF " & INTEGER'IMAGE(LAST) &
64
                       " FOR " & ID);
65
          END IF;
66
 
67
          IF S'LENGTH /= LENGTH THEN
68
               FAILED ("'LENGTH IS " & INTEGER'IMAGE(S'LENGTH) &
69
                       " INSTEAD OF " & INTEGER'IMAGE(LENGTH) &
70
                       " FOR " & ID);
71
          END IF;
72
     END C;
73
 
74
BEGIN
75
     TEST ("C36304A", "CHECK UNUSUAL CONSTANT STRING BOUNDS");
76
 
77
 
78
     C(S0, 1, 0, 0, "S0");
79
     C(S1, 1, 1, 1, "S1");
80
     C(S2, 1, 2, 2, "S2");
81
     C(S5, 1, 5, 5, "S5");
82
     C(S3, 1, 3, 3, "S3");
83
     C(S3C, 3, 5, 3, "S3C");
84
     C(S3D, 3, 5, 3, "S3D");
85
     C(S3E, 3, 5, 3, "S3E");
86
     C(X3, 3, 5, 3, "X3");
87
     C(Y3, 3, 5, 3, "Y3");
88
     C(Z0, IDENT_INT(-3), IDENT_INT(-5), IDENT_INT(0), "Z0");
89
 
90
     RESULT;
91
END C36304A;

powered by: WebSVN 2.1.0

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