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:
parent
890f9edfff
commit
b3abeb576d
@ -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>
|
||||
Revital Eres <eres@il.ibm.com>
|
||||
|
||||
|
5
gcc/testsuite/gnat.dg/oalign1.ads
Normal file
5
gcc/testsuite/gnat.dg/oalign1.ads
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
package Oalign1 is
|
||||
Klunk1 : Integer := 12;
|
||||
for Klunk1'Alignment use Standard'Maximum_Alignment;
|
||||
end;
|
5
gcc/testsuite/gnat.dg/oalign2.ads
Normal file
5
gcc/testsuite/gnat.dg/oalign2.ads
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
package Oalign2 is
|
||||
Klunk2 : Integer := 12;
|
||||
for Klunk2'Alignment use Standard'Maximum_Alignment;
|
||||
end;
|
14
gcc/testsuite/gnat.dg/test_oalign.adb
Normal file
14
gcc/testsuite/gnat.dg/test_oalign.adb
Normal 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;
|
Loading…
Reference in New Issue
Block a user