PR debug/66535
[official-gcc.git] / gcc / testsuite / gnat.dg / small_alignment.adb
blobfbe1c21457c07d71481e067d5807c526a708b33d
1 -- { dg-do run }
2 -- { dg-options "-gnatws" }
4 procedure Small_Alignment is
6 type My_Integer is new Integer;
7 for My_Integer'Alignment use 1;
9 function Set_A return My_Integer is
10 begin
11 return 12;
12 end;
14 function Set_B return My_Integer is
15 begin
16 return 6;
17 end;
19 C : Character;
20 A : My_Integer := Set_A;
21 B : My_Integer := Set_B;
23 begin
24 A := A * B / 2;
25 if A /= 36 then
26 raise Program_Error;
27 end if;
28 end;