diff options
| author | sam <sam@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-20 20:24:33 +0000 |
|---|---|---|
| committer | sam <sam@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-20 20:24:33 +0000 |
| commit | 37e0d910ccc48ebef02cd73da6d0fcd2456806b2 (patch) | |
| tree | 494f8d2e83a30da4b21430267af318af77f1fbf9 | |
| parent | c968a07c40114726a8bde1eca6cdc43e4696009d (diff) | |
| download | ppe42-gcc-37e0d910ccc48ebef02cd73da6d0fcd2456806b2.tar.gz ppe42-gcc-37e0d910ccc48ebef02cd73da6d0fcd2456806b2.zip | |
gcc/testsuite/
PR ada/30740
* gnat.dg/modular.adb: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135675 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/testsuite/gnat.dg/modular.adb | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0ff1a091d54..c49408661e6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +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> diff --git a/gcc/testsuite/gnat.dg/modular.adb b/gcc/testsuite/gnat.dg/modular.adb new file mode 100644 index 00000000000..1eff3332708 --- /dev/null +++ b/gcc/testsuite/gnat.dg/modular.adb @@ -0,0 +1,16 @@ +-- { 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; |

