1-- { dg-do run }
2
3with System;
4procedure align_check is
5   N_Allocated_Buffers : Natural := 0;
6--
7   function New_Buffer (N_Bytes : Natural) return System.Address is
8   begin
9      N_Allocated_Buffers := N_Allocated_Buffers + 1;
10      return System.Null_Address;
11   end;
12--
13   Buffer_Address : constant System.Address := New_Buffer (N_Bytes => 8);
14   N : Natural;
15   for N'Address use Buffer_Address;
16--
17begin
18   if N_Allocated_Buffers /= 1 then
19      raise Program_Error;
20   end if;
21end;
22