1-- { dg-do compile } 2-- { dg-options "-gnatws" } 3 4package body volatile2 is 5 6 procedure Copy is 7 R : Result; 8 M : Integer; 9 subtype Get_Data is Command_Data (Get, R.Data'Last); 10 begin 11 declare 12 G : Get_Data; 13 for G'Address use M'Address; 14 begin 15 for I in 1 .. R.Data'Last loop 16 G.Data (I) := (Time => R.Data (I).Time); 17 end loop; 18 end; 19 end; 20 21end volatile2; 22 23