From: Arnaud Charlet Date: Tue, 27 May 2008 09:11:45 +0000 (+0000) Subject: * gnat.dg/sync1.ad[sb]: New test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dd383eebef22066c2eff724d9d0c964975b72d79;p=gcc.git * gnat.dg/sync1.ad[sb]: New test. From-SVN: r135989 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 79bbe74c750..6bb5bc41fb5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2008-05-27 Arnaud Charlet + + * gnat.dg/sync1.ad[sb]: New test. + 2008-05-27 Kaveh R. Ghazi * gcc.c-torture/compile/pr11832.c: XFAIL on (x86 && ilp32 && pic). diff --git a/gcc/testsuite/gnat.dg/sync1.adb b/gcc/testsuite/gnat.dg/sync1.adb new file mode 100644 index 00000000000..08be6395d68 --- /dev/null +++ b/gcc/testsuite/gnat.dg/sync1.adb @@ -0,0 +1,15 @@ +-- { 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; diff --git a/gcc/testsuite/gnat.dg/sync1.ads b/gcc/testsuite/gnat.dg/sync1.ads new file mode 100644 index 00000000000..81c2f4aabeb --- /dev/null +++ b/gcc/testsuite/gnat.dg/sync1.ads @@ -0,0 +1,12 @@ +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;