annotate gcc/testsuite/ada/acats/tests/c4/c45113a.ada @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 -- C45113A.ADA
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 -- Grant of Unlimited Rights
kono
parents:
diff changeset
4 --
kono
parents:
diff changeset
5 -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
kono
parents:
diff changeset
6 -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
kono
parents:
diff changeset
7 -- unlimited rights in the software and documentation contained herein.
kono
parents:
diff changeset
8 -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
kono
parents:
diff changeset
9 -- this public release, the Government intends to confer upon all
kono
parents:
diff changeset
10 -- recipients unlimited rights equal to those held by the Government.
kono
parents:
diff changeset
11 -- These rights include rights to use, duplicate, release or disclose the
kono
parents:
diff changeset
12 -- released technical data and computer software in whole or in part, in
kono
parents:
diff changeset
13 -- any manner and for any purpose whatsoever, and to have or permit others
kono
parents:
diff changeset
14 -- to do so.
kono
parents:
diff changeset
15 --
kono
parents:
diff changeset
16 -- DISCLAIMER
kono
parents:
diff changeset
17 --
kono
parents:
diff changeset
18 -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
kono
parents:
diff changeset
19 -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
kono
parents:
diff changeset
20 -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
kono
parents:
diff changeset
21 -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
kono
parents:
diff changeset
22 -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
kono
parents:
diff changeset
23 -- PARTICULAR PURPOSE OF SAID MATERIAL.
kono
parents:
diff changeset
24 --*
kono
parents:
diff changeset
25 -- CHECK THAT CONSTRAINT_ERROR IS RAISED WHEN THE OPERANDS OF LOGICAL
kono
parents:
diff changeset
26 -- OPERATORS HAVE DIFFERENT LENGTHS.
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 -- RJW 1/15/86
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 WITH REPORT; USE REPORT;
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 PROCEDURE C45113A IS
kono
parents:
diff changeset
33
kono
parents:
diff changeset
34 BEGIN
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 TEST( "C45113A" , "CHECK ON LOGICAL OPERATORS WITH " &
kono
parents:
diff changeset
37 "OPERANDS OF DIFFERENT LENGTHS" );
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 DECLARE
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 TYPE ARR IS ARRAY ( INTEGER RANGE <> ) OF BOOLEAN;
kono
parents:
diff changeset
42
kono
parents:
diff changeset
43 A : ARR( IDENT_INT(1) .. IDENT_INT(2) ) := ( TRUE, FALSE );
kono
parents:
diff changeset
44 B : ARR( IDENT_INT(1) .. IDENT_INT(3) ) := ( TRUE, FALSE,
kono
parents:
diff changeset
45 TRUE );
kono
parents:
diff changeset
46
kono
parents:
diff changeset
47 BEGIN
kono
parents:
diff changeset
48
kono
parents:
diff changeset
49 BEGIN -- TEST FOR 'AND'.
kono
parents:
diff changeset
50 IF (A AND B) = B THEN
kono
parents:
diff changeset
51 FAILED ( "A AND B = B" );
kono
parents:
diff changeset
52 END IF;
kono
parents:
diff changeset
53 FAILED ( "NO EXCEPTION RAISED FOR 'AND'" );
kono
parents:
diff changeset
54 EXCEPTION
kono
parents:
diff changeset
55 WHEN CONSTRAINT_ERROR =>
kono
parents:
diff changeset
56 NULL;
kono
parents:
diff changeset
57 WHEN OTHERS =>
kono
parents:
diff changeset
58 FAILED ( "WRONG EXCEPTION RAISED FOR 'AND'" );
kono
parents:
diff changeset
59 END;
kono
parents:
diff changeset
60
kono
parents:
diff changeset
61
kono
parents:
diff changeset
62 BEGIN -- TEST FOR 'OR'.
kono
parents:
diff changeset
63 IF (A OR B) = B THEN
kono
parents:
diff changeset
64 FAILED ( "A OR B = B" );
kono
parents:
diff changeset
65 END IF;
kono
parents:
diff changeset
66 FAILED ( "NO EXCEPTION RAISED FOR 'OR'" );
kono
parents:
diff changeset
67 EXCEPTION
kono
parents:
diff changeset
68 WHEN CONSTRAINT_ERROR =>
kono
parents:
diff changeset
69 NULL;
kono
parents:
diff changeset
70 WHEN OTHERS =>
kono
parents:
diff changeset
71 FAILED ( "WRONG EXCEPTION RAISED FOR 'OR'" );
kono
parents:
diff changeset
72 END;
kono
parents:
diff changeset
73
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 BEGIN -- TEST FOR 'XOR'.
kono
parents:
diff changeset
76 IF (A XOR B) = B THEN
kono
parents:
diff changeset
77 FAILED ( "A XOR B = B" );
kono
parents:
diff changeset
78 END IF;
kono
parents:
diff changeset
79 FAILED ( "NO EXCEPTION RAISED FOR 'XOR'" );
kono
parents:
diff changeset
80 EXCEPTION
kono
parents:
diff changeset
81 WHEN CONSTRAINT_ERROR =>
kono
parents:
diff changeset
82 NULL;
kono
parents:
diff changeset
83 WHEN OTHERS =>
kono
parents:
diff changeset
84 FAILED ( "WRONG EXCEPTION RAISED FOR 'XOR'" );
kono
parents:
diff changeset
85 END;
kono
parents:
diff changeset
86
kono
parents:
diff changeset
87 END;
kono
parents:
diff changeset
88
kono
parents:
diff changeset
89 RESULT;
kono
parents:
diff changeset
90
kono
parents:
diff changeset
91 END C45113A;