1-- { dg-do compile } 2 3package body Global 4 with Refined_State => (State => Constit) 5is 6 Constit : Integer := 123; 7 8 protected body Prot_Typ is 9 procedure Force_Body is null; 10 11 procedure Aspect_On_Spec 12 with Global => (Input => Constit); 13 procedure Aspect_On_Spec is null; 14 15 procedure Aspect_On_Body 16 with Global => (Input => Constit) 17 is begin null; end Aspect_On_Body; 18 19 procedure Pragma_On_Spec; 20 pragma Global ((Input => Constit)); 21 procedure Pragma_On_Spec is null; 22 23 procedure Pragma_On_Body is 24 pragma Global ((Input => Constit)); 25 begin null; end Pragma_On_Body; 26 end Prot_Typ; 27 28 protected body Prot_Obj is 29 procedure Force_Body is null; 30 31 procedure Aspect_On_Spec 32 with Global => (Input => Constit); 33 procedure Aspect_On_Spec is null; 34 35 procedure Aspect_On_Body 36 with Global => (Input => Constit) 37 is begin null; end Aspect_On_Body; 38 39 procedure Pragma_On_Spec; 40 pragma Global ((Input => Constit)); 41 procedure Pragma_On_Spec is null; 42 43 procedure Pragma_On_Body is 44 pragma Global ((Input => Constit)); 45 begin null; end Pragma_On_Body; 46 end Prot_Obj; 47 48 task body Task_Typ is 49 procedure Aspect_On_Spec 50 with Global => (Input => Constit); 51 procedure Aspect_On_Spec is null; 52 53 procedure Aspect_On_Body 54 with Global => (Input => Constit) 55 is begin null; end Aspect_On_Body; 56 57 procedure Pragma_On_Spec; 58 pragma Global ((Input => Constit)); 59 procedure Pragma_On_Spec is null; 60 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; 67 68 task body Task_Obj is 69 procedure Aspect_On_Spec 70 with Global => (Input => Constit); 71 procedure Aspect_On_Spec is null; 72 73 procedure Aspect_On_Body 74 with Global => (Input => Constit) 75 is begin null; end Aspect_On_Body; 76 77 procedure Pragma_On_Spec; 78 pragma Global ((Input => Constit)); 79 procedure Pragma_On_Spec is null; 80 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; 87end Global; 88