test_oalign.adb, [...]: New test.

2007-08-31  Olivier Hainque  <hainque@adacore.com>

	* gnat.dg/test_oalign.adb, oalign[12].ads: New test.

From-SVN: r127957
This commit is contained in:
Olivier Hainque 2007-08-31 07:17:34 +00:00 committed by Olivier Hainque
parent 890f9edfff
commit b3abeb576d
4 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2007-08-31 Olivier Hainque <hainque@adacore.com>
* gnat.dg/test_oalign.adb, oalign[12].ads: New test.
2007-08-31 David Edelsohn <edelsohn@gnu.org> 2007-08-31 David Edelsohn <edelsohn@gnu.org>
Revital Eres <eres@il.ibm.com> Revital Eres <eres@il.ibm.com>

View File

@ -0,0 +1,5 @@
package Oalign1 is
Klunk1 : Integer := 12;
for Klunk1'Alignment use Standard'Maximum_Alignment;
end;

View File

@ -0,0 +1,5 @@
package Oalign2 is
Klunk2 : Integer := 12;
for Klunk2'Alignment use Standard'Maximum_Alignment;
end;

View File

@ -0,0 +1,14 @@
-- { dg-do run }
with System.Storage_Elements; use System.Storage_Elements;
with Oalign1, Oalign2; use Oalign1, Oalign2;
procedure Test_Oalign is
begin
if Klunk1'Address mod Klunk1'Alignment /= 0 then
raise Program_Error;
end if;
if Klunk2'Address mod Klunk2'Alignment /= 0 then
raise Program_Error;
end if;
end;