summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/test_prio.adb
blob: 30d07a81e04bffb8a2a6dbbecd104bc48b3db50c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-- { dg-do run }
-- { dg-options "-gnatws" }

pragma Locking_Policy (Ceiling_Locking);
with test_prio_p;use test_prio_p;
with text_io; use text_io;
procedure Test_Prio is
   task Tsk is
      pragma Priority (10);
   end Tsk;
   task body Tsk is
   begin   
      Sema2.Seize;
      Sema1.Seize;
      Put_Line ("error");
   exception
      when Program_Error => null;  -- OK
   end;    
begin   
   null;   
end;