1-- { dg-do compile }
2-- { dg-options "-gnatws" }
3
4with System; use System;
5
6procedure Trampoline1 is
7
8  A : Integer;
9
10  function F (I : Integer) return Integer is
11  begin
12    return A + I;
13  end F;
14
15  CA : System.Address := F'Code_Address;
16
17begin
18  if CA = System.Null_Address then
19    raise Program_Error;
20  end if;
21end;
22
23-- { dg-final { scan-assembler-not "GNU-stack.*x" } }
24