aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/opt38_pkg.adb
blob: 7cbbeeab3282cc4560ef481d4eb5e81d04614651 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package body Opt38_Pkg is

  procedure Proc (I : Integer);
  pragma Inline (Proc);

  procedure Proc (I : Integer) is

    procedure Inner;
    pragma No_Inline (Inner);

    procedure Inner is
    begin
      if I /= 110 then
        raise Program_Error;
      end if;
    end;

  begin
    if I > 0 then
      Inner;
    end if;
  end;

  procedure Test (I : Integer) is
  begin
    if I > -1 then
      Proc (I);
    else
      Proc (I + 111);
    end if;
  end;

end Opt38_Pkg;