aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/pure_function3b.adb
blob: 97e19fcd2e46ebad52ab9f24c69d537f4605c05a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-- { dg-do compile }
-- { dg-options "-O -gnatws -fdump-tree-optimized" }

with Pure_Function3_Pkg; use Pure_Function3_Pkg;

procedure Pure_Function3b is
   V : T;
begin
   if F (V) = 1 then
      raise Program_Error;
   end if;
   Set (V);
   if F (V) = 2 then
      raise Program_Error;
   end if;
end;

-- { dg-final { scan-tree-dump-times "pure_function3_pkg.f" 2 "optimized" } }