1-- { dg-do run } 2with Interfaces; use Interfaces; 3procedure Exp0_Eval is 4 5 F_Count : Natural := 0; 6 7 function F return Integer is 8 begin 9 F_Count := F_Count + 1; 10 return 1; 11 end F; 12 13 function F return Unsigned_32 is 14 begin 15 F_Count := F_Count + 1; 16 return 1; 17 end F; 18 19 R : constant Integer := 20 F ** 0 + 21 F * 0 + 22 0 * F + 23 Integer (Unsigned_32'(F) mod 1) + 24 Integer (Unsigned_32'(F) rem 1); 25 pragma Warnings (Off, R); 26begin 27 if F_Count /= 5 then 28 raise Program_Error 29 with "incorrect numbers of calls to F:" & F_Count'Img; 30 end if; 31end Exp0_Eval; 32