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/] [c9/] [c94020a.ada] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C94020A.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 THE CONDITIONS FOR TERMINATION ARE RECOGNIZED WHEN THE
26
-- LAST MISSING TASK TERMINATES DUE TO AN ABORT
27
 
28
-- JEAN-PIERRE ROSEN 08-MAR-1984
29
-- JBG 6/1/84
30
-- PWN 09/11/94  REMOVED PRAGMA PRIORITY FOR ADA 9X.
31
 
32
WITH SYSTEM; USE SYSTEM;
33
WITH REPORT; USE REPORT;
34
PROCEDURE C94020A IS
35
 
36
     TASK TYPE T2 IS
37
     END T2;
38
 
39
     TASK TYPE T3 IS
40
          ENTRY E;
41
     END T3;
42
 
43
     TASK BODY T2 IS
44
     BEGIN
45
          COMMENT("T2");
46
     END;
47
 
48
     TASK BODY T3 IS
49
     BEGIN
50
          COMMENT("T3");
51
          SELECT
52
               ACCEPT E;
53
          OR TERMINATE;
54
          END SELECT;
55
          FAILED("T3 EXITED SELECT OR TERMINATE");
56
     END;
57
 
58
BEGIN
59
 
60
     TEST ("C94020A", "TEST OF TASK DEPENDENCES, TERMINATE, ABORT");
61
 
62
     DECLARE
63
          TASK TYPE T1 IS
64
          END T1;
65
 
66
          V1 : T1;
67
          TYPE A_T1 IS ACCESS T1;
68
 
69
          TASK BODY T1 IS
70
          BEGIN
71
               ABORT T1;
72
               DELAY 0.0;          --SYNCHRONIZATION POINT
73
               FAILED("T1 NOT ABORTED");
74
          END;
75
 
76
     BEGIN
77
          DECLARE
78
               V2 : T2;
79
               A1 : A_T1;
80
          BEGIN
81
               DECLARE
82
                    V3 : T3;
83
                    TASK T4 IS
84
                    END T4;
85
                    TASK BODY T4 IS
86
                         TASK T41 IS
87
                         END T41;
88
                         TASK BODY T41 IS
89
                         BEGIN
90
                              COMMENT("T41");
91
                              ABORT T4;
92
                              DELAY 0.0;       --SYNCHRONIZATION POINT
93
                              FAILED("T41 NOT ABORTED");
94
                         END;
95
                    BEGIN  --T4
96
                         COMMENT("T4");
97
                    END;
98
               BEGIN
99
                    COMMENT("BLOC 3");
100
               END;
101
               COMMENT("BLOC 2");
102
               A1 := NEW T1;
103
          END;
104
          COMMENT("BLOC 1");
105
     EXCEPTION
106
          WHEN OTHERS => FAILED("SOME EXCEPTION RAISED");
107
     END;
108
 
109
     RESULT;
110
 
111
END C94020A;

powered by: WebSVN 2.1.0

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