aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/spark1.adb
blob: 27760237c9bbf909580cf66e8377c462f42935b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--  { dg-do compile }

package body Spark1 is

   task body Worker is

      procedure Update with
        Global => (In_Out => Mailbox) --  { dg-error "global item \"Mailbox\" cannot have mode In_Out or Output|item already appears as input of task \"Worker\"" }
      is
         Tmp : Integer := Mailbox;
      begin
         Mailbox := Tmp + 1;
      end Update;

      X : Integer := Mailbox;
   begin
      loop
         Update;
      end loop;
   end;

end;