OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c4/] [c45662b.ada] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
-- C45662B.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 THE TRUTH TABLE FOR  'NOT'  ON DERIVED-BOOLEAN-TYPE OPERANDS.
26
 
27
-- THE COMBINATIONS OF  'NOT'  WITH  'AND' , 'OR' , 'XOR'  ARE TESTED
28
--    IN C45101K.
29
 
30
 
31
-- RM    28 OCTOBER 1980
32
-- TBN 10/21/85     RENAMED FROM C45401B-AB.ADA.  REMOVED DUPLICATED
33
--                  CODE NEAR END.
34
 
35
WITH  REPORT; USE REPORT;
36
PROCEDURE  C45662B  IS
37
 
38
     TYPE  NB  IS  NEW BOOLEAN ;
39
 
40
     TVAR , FVAR , CVAR : NB := NB'(FALSE) ; -- INITIAL VALUE IRRELEVANT
41
     ERROR_COUNT : INTEGER := 0 ;            -- INITIAL VALUE ESSENTIAL
42
 
43
     PROCEDURE  BUMP  IS
44
     BEGIN
45
          ERROR_COUNT := ERROR_COUNT + 1 ;
46
     END BUMP ;
47
 
48
     FUNCTION  IDENT_NEW_BOOL( THE_ARGUMENT : NB )  RETURN  NB  IS
49
     BEGIN
50
          IF  EQUAL(2,2)  THEN  RETURN THE_ARGUMENT;
51
          ELSE  RETURN  NB'(FALSE) ;
52
          END IF;
53
     END ;
54
 
55
 
56
BEGIN
57
 
58
     TEST( "C45662B" , "CHECK THE TRUTH TABLE FOR  'NOT'" &
59
                       " ON DERIVED-BOOLEAN-TYPE OPERANDS" ) ;
60
 
61
     FOR  A  IN  NB  LOOP
62
 
63
          CVAR  :=  NOT A ;
64
 
65
          IF  BOOLEAN( NOT A )  THEN
66
               IF  BOOLEAN( A )  THEN  BUMP ;
67
               END IF ;
68
          END IF;
69
 
70
          IF  BOOLEAN( CVAR )  THEN
71
               IF  BOOLEAN( A )  THEN  BUMP ;
72
               END IF ;
73
          END IF;
74
 
75
          IF  BOOLEAN(
76
 
77
              NOT( NOT( NOT( NOT( NOT(
78
              NOT( NOT( NOT( NOT( NOT(
79
              NOT( NOT( NOT( NOT( NOT(
80
              NOT( NOT( NOT( NOT( NOT(   CVAR  ))))) ))))) ))))) )))))
81
                      )
82
          THEN
83
               IF  BOOLEAN( A )  THEN  BUMP ;
84
               END IF ;
85
          END IF;
86
 
87
     END LOOP ;
88
 
89
     FOR  I  IN  1..2  LOOP
90
 
91
          CVAR  :=  NOT( NB( I > 1 ) ) ;
92
 
93
          IF  BOOLEAN(  NOT(  NB( I > 1 )))  THEN
94
               IF  I>1  THEN  BUMP ;
95
               END IF ;
96
          END IF;
97
 
98
          IF  BOOLEAN( CVAR )  THEN
99
               IF  I>1  THEN  BUMP ;
100
               END IF ;
101
          END IF;
102
 
103
     END LOOP ;
104
 
105
     IF  BOOLEAN( NOT( NB'(TRUE ))) THEN  BUMP ;                END IF ;
106
     IF  BOOLEAN( NOT( NB'(FALSE))) THEN  NULL ;  ELSE  BUMP ;  END IF ;
107
 
108
 
109
     TVAR := IDENT_NEW_BOOL( NB'(TRUE ) );
110
     FVAR := IDENT_NEW_BOOL( NB'(FALSE) );
111
 
112
     IF  BOOLEAN( NOT TVAR )  THEN  BUMP ;                END IF ;
113
     IF  BOOLEAN( NOT FVAR )  THEN  NULL ;  ELSE  BUMP ;  END IF ;
114
 
115
     IF  ERROR_COUNT  /= 0  THEN  FAILED( "'NOT' TRUTH TABLE" );
116
     END IF ;
117
 
118
     RESULT;
119
 
120
END C45662B;

powered by: WebSVN 2.1.0

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