OSDN Git Service

* tree-ssa-pre.c (create_component_ref_by_pieces_1) <ARRAY_REF>: Drop
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gnat.dg / exp0_eval.adb
1 -- { dg-do run }
2 with Interfaces; use Interfaces;
3 procedure 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);
26 begin
27    if F_Count /= 5 then
28       raise Program_Error
29         with "incorrect numbers of calls to F:" & F_Count'Img;
30    end if;
31 end Exp0_Eval;