+2008-05-27 Arnaud Charlet <charlet@adacore.com>
+
+ * gnat.dg/sync1.ad[sb]: New test.
+
2008-05-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.c-torture/compile/pr11832.c: XFAIL on (x86 && ilp32 && pic).
--- /dev/null
+-- { dg-do compile }
+package body sync1 is
+ protected body Chopstick is
+
+ entry Pick_Up when not Busy is
+ begin
+ Busy := True;
+ end Pick_Up;
+
+ procedure Put_Down is
+ begin
+ Busy := False;
+ end Put_Down;
+ end Chopstick;
+end sync1;
--- /dev/null
+package sync1 is
+ type Chopstick_Type is synchronized interface;
+
+ type Chopstick is new Chopstick_Type with private;
+private
+ protected type Chopstick is new Chopstick_Type with
+ entry Pick_Up;
+ procedure Put_Down;
+ private
+ Busy : Boolean := False;
+ end Chopstick;
+end sync1;