annotate gcc/testsuite/ada/acats/tests/c9/c95034a.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 -- C95034A.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 A CALLING TASK IS SUSPENDED IF THE RECEIVING TASK
kono
parents:
diff changeset
26 -- HAS NOT REACHED A CORRESPONDING ACCEPT STATEMENT.
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 -- WEI 3/ 4/82
kono
parents:
diff changeset
29 -- JWC 6/28/85 RENAMED FROM C950BJA-B.ADA
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31 with Impdef;
kono
parents:
diff changeset
32 WITH REPORT;
kono
parents:
diff changeset
33 USE REPORT;
kono
parents:
diff changeset
34 PROCEDURE C95034A IS
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 SUBTYPE ARG IS NATURAL RANGE 0..9;
kono
parents:
diff changeset
37 SPYNUMB : NATURAL := 0;
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 PROCEDURE PSPY_NUMB (DIGT: IN ARG) IS
kono
parents:
diff changeset
40 BEGIN
kono
parents:
diff changeset
41 SPYNUMB := 10*SPYNUMB+DIGT;
kono
parents:
diff changeset
42 END PSPY_NUMB;
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 TASK T1 IS
kono
parents:
diff changeset
45 ENTRY E1;
kono
parents:
diff changeset
46 ENTRY E2;
kono
parents:
diff changeset
47 END T1;
kono
parents:
diff changeset
48
kono
parents:
diff changeset
49 TASK BODY T1 IS
kono
parents:
diff changeset
50 BEGIN
kono
parents:
diff changeset
51 ACCEPT E1 DO
kono
parents:
diff changeset
52 PSPY_NUMB (1);
kono
parents:
diff changeset
53 DELAY 1.0 * Impdef.One_Second;
kono
parents:
diff changeset
54 END E1;
kono
parents:
diff changeset
55 ACCEPT E2 DO
kono
parents:
diff changeset
56 PSPY_NUMB (2);
kono
parents:
diff changeset
57 END E2;
kono
parents:
diff changeset
58 END T1;
kono
parents:
diff changeset
59
kono
parents:
diff changeset
60 TASK T2 IS
kono
parents:
diff changeset
61 ENTRY BYE;
kono
parents:
diff changeset
62 END T2;
kono
parents:
diff changeset
63
kono
parents:
diff changeset
64 TASK BODY T2 IS
kono
parents:
diff changeset
65 BEGIN
kono
parents:
diff changeset
66 T1.E2;
kono
parents:
diff changeset
67 PSPY_NUMB (3);
kono
parents:
diff changeset
68 ACCEPT BYE;
kono
parents:
diff changeset
69 END T2;
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71 BEGIN
kono
parents:
diff changeset
72
kono
parents:
diff changeset
73 TEST ("C95034A", "SUSPENSION OF CALLING TASK");
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 T1.E1;
kono
parents:
diff changeset
76 T2.BYE;
kono
parents:
diff changeset
77
kono
parents:
diff changeset
78 IF SPYNUMB /= 123 THEN
kono
parents:
diff changeset
79 FAILED ("ERROR DURING TASK EXECUTION");
kono
parents:
diff changeset
80 COMMENT ("ACTUAL ORDER WAS:" & INTEGER'IMAGE(SPYNUMB));
kono
parents:
diff changeset
81 END IF;
kono
parents:
diff changeset
82
kono
parents:
diff changeset
83 RESULT;
kono
parents:
diff changeset
84
kono
parents:
diff changeset
85 END C95034A;