aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/noinline2.adb
blob: 0c26edeab9c11761b3d7ff6f251d5dd320de63c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- { dg-do compile }
-- { dg-options "-O2 -fdump-tree-optimized" }

package body Noinline2 is

  function Inner (A, B : Integer) return Integer;
  pragma No_Inline (Inner);

  function Inner (A, B : Integer) return Integer is
  begin
    return A + B;
  end;

  function F (A, B : Integer) return Integer is
  begin
    return Inner (A, B) + Inner (A, -B);
  end;

end Noinline2;

-- { dg-final { scan-tree-dump-times "noinline2.inner" 2 "optimized"  } }
-- { dg-final { cleanup-tree-dump "optimized" } }