Wattributes-10.c: Add -fno-common option on hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / gnat.dg / global.adb
blob521a6293d7593c7e84e92772fe31169fd1b9aa10
1 -- { dg-do compile }
3 package body Global
4 with Refined_State => (State => Constit)
5 is
6 Constit : Integer := 123;
8 protected body Prot_Typ is
9 procedure Force_Body is null;
11 procedure Aspect_On_Spec
12 with Global => (Input => Constit);
13 procedure Aspect_On_Spec is null;
15 procedure Aspect_On_Body
16 with Global => (Input => Constit)
17 is begin null; end Aspect_On_Body;
19 procedure Pragma_On_Spec;
20 pragma Global ((Input => Constit));
21 procedure Pragma_On_Spec is null;
23 procedure Pragma_On_Body is
24 pragma Global ((Input => Constit));
25 begin null; end Pragma_On_Body;
26 end Prot_Typ;
28 protected body Prot_Obj is
29 procedure Force_Body is null;
31 procedure Aspect_On_Spec
32 with Global => (Input => Constit);
33 procedure Aspect_On_Spec is null;
35 procedure Aspect_On_Body
36 with Global => (Input => Constit)
37 is begin null; end Aspect_On_Body;
39 procedure Pragma_On_Spec;
40 pragma Global ((Input => Constit));
41 procedure Pragma_On_Spec is null;
43 procedure Pragma_On_Body is
44 pragma Global ((Input => Constit));
45 begin null; end Pragma_On_Body;
46 end Prot_Obj;
48 task body Task_Typ is
49 procedure Aspect_On_Spec
50 with Global => (Input => Constit);
51 procedure Aspect_On_Spec is null;
53 procedure Aspect_On_Body
54 with Global => (Input => Constit)
55 is begin null; end Aspect_On_Body;
57 procedure Pragma_On_Spec;
58 pragma Global ((Input => Constit));
59 procedure Pragma_On_Spec is null;
61 procedure Pragma_On_Body is
62 pragma Global ((Input => Constit));
63 begin null; end Pragma_On_Body;
64 begin
65 accept Force_Body;
66 end Task_Typ;
68 task body Task_Obj is
69 procedure Aspect_On_Spec
70 with Global => (Input => Constit);
71 procedure Aspect_On_Spec is null;
73 procedure Aspect_On_Body
74 with Global => (Input => Constit)
75 is begin null; end Aspect_On_Body;
77 procedure Pragma_On_Spec;
78 pragma Global ((Input => Constit));
79 procedure Pragma_On_Spec is null;
81 procedure Pragma_On_Body is
82 pragma Global ((Input => Constit));
83 begin null; end Pragma_On_Body;
84 begin
85 accept Force_Body;
86 end Task_Obj;
87 end Global;