PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gnat.dg / elab4_pkg.adb
blobdb91dc712a8b13e5788d6e01a220a7dfb97cd1df
1 with Ada.Text_IO; use Ada.Text_IO;
3 package body Elab4_Pkg is
5 --------------------------------------------------
6 -- Call to call, instantiation, task activation --
7 --------------------------------------------------
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;
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;
24 Elab_1 : constant Boolean := Elaborator_1;
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;
33 function Elaborator_2 return Boolean is
34 begin
35 Suppressed_Call_2;
36 return True;
37 end Elaborator_2;
39 Elab_2 : constant Boolean := Elaborator_2;
41 -----------------------------------------------------------
42 -- Instantiation to call, instantiation, task activation --
43 -----------------------------------------------------------
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;
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;
61 Elab_3 : constant Boolean := Elaborator_3;
63 -------------------------------------------------------------
64 -- Task activation to call, instantiation, task activation --
65 -------------------------------------------------------------
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;
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;
82 Elab_4 : constant Boolean := Elaborator_4;
84 procedure ABE_Call is
85 begin
86 Put_Line ("ABE_Call");
87 end ABE_Call;
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;
95 task body ABE_Task is
96 begin
97 Put_Line ("ABE_Task");
98 end ABE_Task;
99 end Elab4_Pkg;