Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gnat.dg / modular5.adb
blob7fcf59ce849ffb689269260db2e45a28347bf881
1 -- { dg-do compile }
2 -- { dg-options "-gnata" }
4 procedure Modular5 is
5 type U64 is mod 2 ** 64;
6 Maybe : Boolean := 2 ** 10 < U64'Succ (U64'last - 1);
7 For_Sure : Boolean := U64'(18446744073709551615) > 2;
8 Ditto : Boolean := 18446744073709551615 > 2;
10 generic
11 type TG is mod <>;
12 package PG is
13 X : TG;
14 pragma Assert (for all K in 1 .. 2 => 2 ** K <= TG'Last);
15 pragma Assert (for all K in 1 .. 2 => 2 ** K <= TG'Last - 1);
17 Maybe : Boolean := 2 ** 10 < TG'Succ (TG'last - 1);
18 For_Sure : Boolean := TG'(18446744073709551615) > 2;
19 end PG;
21 package IG is new PG (U64);
23 begin
24 pragma Assert (for all K in 1 .. 2 => 2 ** K <= U64'Last);
25 pragma Assert (for all K in 1 .. 2 => 2 ** K <= U64'Last - 1);
26 end Modular5;