test_oalign.adb, [...]: New test.
authorOlivier Hainque <hainque@adacore.com>
Fri, 31 Aug 2007 07:17:34 +0000 (07:17 +0000)
committerOlivier Hainque <hainque@gcc.gnu.org>
Fri, 31 Aug 2007 07:17:34 +0000 (07:17 +0000)
2007-08-31  Olivier Hainque  <hainque@adacore.com>

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

From-SVN: r127957

gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/oalign1.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/oalign2.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/test_oalign.adb [new file with mode: 0644]

index f3d9fd7a417051ca03d02c2aad15758b17f7c7b9..b5624830ed74fda7a0a38cb348b06ff46f33d46e 100644 (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>
             Revital Eres  <eres@il.ibm.com>
 
diff --git a/gcc/testsuite/gnat.dg/oalign1.ads b/gcc/testsuite/gnat.dg/oalign1.ads
new file mode 100644 (file)
index 0000000..26fec13
--- /dev/null
@@ -0,0 +1,5 @@
+
+package Oalign1 is
+   Klunk1 : Integer := 12;
+   for Klunk1'Alignment use Standard'Maximum_Alignment;
+end;
diff --git a/gcc/testsuite/gnat.dg/oalign2.ads b/gcc/testsuite/gnat.dg/oalign2.ads
new file mode 100644 (file)
index 0000000..abe4aca
--- /dev/null
@@ -0,0 +1,5 @@
+
+package Oalign2 is
+   Klunk2 : Integer := 12;
+   for Klunk2'Alignment use Standard'Maximum_Alignment;
+end;
diff --git a/gcc/testsuite/gnat.dg/test_oalign.adb b/gcc/testsuite/gnat.dg/test_oalign.adb
new file mode 100644 (file)
index 0000000..5ad0111
--- /dev/null
@@ -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;