PR target/84336
[official-gcc.git] / gcc / testsuite / gnat.dg / entry_family.adb
blob21d208ff06c57ab27f373c32ceb57debae59de78
1 -- { dg-do compile }
2 -- { dg-options "-gnatwu" }
4 with Ada.Numerics.Discrete_Random; use Ada.Numerics;
6 procedure Entry_Family is
7 protected Family is
8 entry Call (Boolean);
9 end Family;
11 protected body Family is
12 entry Call (for P in Boolean) when True is
13 begin
14 null;
15 end Call;
17 end Family;
19 package Random_Boolean is new Discrete_Random (Result_Subtype => Boolean);
20 use Random_Boolean;
22 Boolean_Generator : Generator;
24 B : constant Boolean := Random (Boolean_Generator);
26 begin
27 Family.Call (B);
28 end Entry_Family;