Debian Codegraph @

gcc/testsuite/gnat.dg/elab4_pkg.adb

raw
1 with Ada.Text_IO; use Ada.Text_IO;
2
3 package body Elab4_Pkg is
4
5 --------------------------------------------------
6 -- Call to call, instantiation, task activation --
7 --------------------------------------------------
8
9 procedure Suppressed_Call_1 is
10 package Inst is new ABE_Gen;
11 T : ABE_Task;
12 begin
13 ABE_Call;
14 end Suppressed_Call_1;
15
16 function Elaborator_1 return Boolean is
17 begin
18 pragma Warnings ("L");
19 Suppressed_Call_1;
20 pragma Warnings ("l");
21 return True;
22 end Elaborator_1;
23
24 Elab_1 : constant Boolean := Elaborator_1;
25
26 procedure Suppressed_Call_2 is
27 package Inst is new ABE_Gen;
28 T : ABE_Task;
29 begin
30 ABE_Call;
31 end Suppressed_Call_2;
32
33 function Elaborator_2 return Boolean is
34 begin
35 Suppressed_Call_2;
36 return True;
37 end Elaborator_2;
38
39 Elab_2 : constant Boolean := Elaborator_2;
40
41 -----------------------------------------------------------
42 -- Instantiation to call, instantiation, task activation --
43 -----------------------------------------------------------
44
45 package body Suppressed_Generic is
46 procedure Force_Body is begin null; end Force_Body;
47 package Inst is new ABE_Gen;
48 T : ABE_Task;
49 begin
50 ABE_Call;
51 end Suppressed_Generic;
52
53 function Elaborator_3 return Boolean is
54 pragma Warnings ("L");
55 package Inst is new Suppressed_Generic;
56 pragma Warnings ("l");
57 begin
58 return True;
59 end Elaborator_3;
60
61 Elab_3 : constant Boolean := Elaborator_3;
62
63 -------------------------------------------------------------
64 -- Task activation to call, instantiation, task activation --
65 -------------------------------------------------------------
66
67 task body Suppressed_Task is
68 package Inst is new ABE_Gen;
69 T : ABE_Task;
70 begin
71 ABE_Call;
72 end Suppressed_Task;
73
74 function Elaborator_4 return Boolean is
75 pragma Warnings ("L");
76 T : Suppressed_Task;
77 pragma Warnings ("l");
78 begin
79 return True;
80 end Elaborator_4;
81
82 Elab_4 : constant Boolean := Elaborator_4;
83
84 procedure ABE_Call is
85 begin
86 Put_Line ("ABE_Call");
87 end ABE_Call;
88
89 package body ABE_Gen is
90 procedure Force_Body is begin null; end Force_Body;
91 begin
92 Put_Line ("ABE_Gen");
93 end ABE_Gen;
94
95 task body ABE_Task is
96 begin
97 Put_Line ("ABE_Task");
98 end ABE_Task;
99 end Elab4_Pkg;