gcc/testsuite/
PR ada/30740
* gnat.dg/modular.adb: New test.
From-SVN: r135675
+2008-05-20 Samuel Tardieu <sam@rfc1149.net>
+
+ PR ada/30740
+ * gnat.dg/modular.adb: New test.
+
2008-05-20 Jan Sjodin <jan.sjodin@amd.com>
Sebastian Pop <sebastian.pop@amd.com>
--- /dev/null
+-- { dg-do run }
+with Ada.Text_IO;
+procedure Modular is
+ type T1 is mod 9;
+ package T1_IO is new Ada.Text_IO.Modular_IO(T1);
+ X: T1 := 8;
+ J1: constant := 5;
+begin
+ for J2 in 5..5 loop
+ pragma Assert(X*(2**J1) = X*(2**J2));
+ if X*(2**J1) /= X*(2**J2) then
+ Ada.Text_IO.Put_Line("Failed");
+ raise Program_Error;
+ end if;
+ end loop;
+end Modular;