Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gnat.dg / misaligned_param.adb
blobdd591d06a8348fb4cffcb75ad94afb9ad12ae597
1 -- { dg-do run }
2 -- { dg-options "-gnatws" }
4 with Misaligned_Param_Pkg;
6 procedure Misaligned_Param is
8 procedure Channel_Eth (Status : out Integer; Kind : out Integer);
10 pragma Import (External, Channel_Eth);
11 pragma Import_Valued_Procedure
12 (Channel_Eth, "channel_eth", (Integer, Integer), (VALUE, REFERENCE));
14 type Channel is record
15 B : Boolean;
16 Kind : Integer;
17 end record;
18 pragma Pack (Channel);
20 MyChan : Channel;
21 Status : Integer;
23 begin
24 MyChan.Kind := 0;
25 Channel_Eth (Status => Status, Kind => MyChan.Kind);
27 if Mychan.Kind = 0 then
28 raise Program_Error;
29 end if;
30 end;