diff options
Diffstat (limited to 'gcc/testsuite/gnat.dg/modular1.adb')
-rw-r--r-- | gcc/testsuite/gnat.dg/modular1.adb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/modular1.adb b/gcc/testsuite/gnat.dg/modular1.adb new file mode 100644 index 000000000..b9fcde95f --- /dev/null +++ b/gcc/testsuite/gnat.dg/modular1.adb @@ -0,0 +1,15 @@ +-- { dg-do run } + +with Ada.Text_IO; +procedure Modular1 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 + raise Program_Error; + end if; + end loop; +end Modular1; |