view gcc/testsuite/gnat.dg/modular1.adb @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
line wrap: on
line source

--  { 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;