From dd383eebef22066c2eff724d9d0c964975b72d79 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 27 May 2008 09:11:45 +0000 Subject: [PATCH] * gnat.dg/sync1.ad[sb]: New test. From-SVN: r135989 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gnat.dg/sync1.adb | 15 +++++++++++++++ gcc/testsuite/gnat.dg/sync1.ads | 12 ++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 gcc/testsuite/gnat.dg/sync1.adb create mode 100644 gcc/testsuite/gnat.dg/sync1.ads 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; -- 2.30.2