1-- { dg-do compile }
2
3package body Prefetch1 is
4
5  procedure Prefetch_1 (Addr : System.Address);
6  pragma Import (Intrinsic, Prefetch_1, "__builtin_prefetch");
7
8  procedure Prefetch_2 (Addr : System.Address; RW : Integer);
9  pragma Import (Intrinsic, Prefetch_2, "__builtin_prefetch");
10
11  procedure Prefetch_3 (Addr : System.Address; RW : Integer; Locality : Integer);
12  pragma Import (Intrinsic, Prefetch_3, "__builtin_prefetch");
13
14  procedure My_Proc1 (Addr : System.Address) is
15  begin
16    Prefetch_1 (Addr);
17  end;
18
19  procedure My_Proc2 (Addr : System.Address) is
20  begin
21    Prefetch_2 (Addr, 1);
22  end;
23
24  procedure My_Proc3 (Addr : System.Address) is
25  begin
26    Prefetch_3 (Addr, 1, 1);
27  end;
28
29end Prefetch1;
30