Debian Codegraph @

gcc/testsuite/gnat.dg/opt64.adb

raw
1 -- { dg-do run }
2 -- { dg-options "-O2" }
3
4 -- The issue which prompted the test is a compilation failure. Might
5 -- as well verify that the generated code performs as expected.
6
7 with opt64_pkg; use opt64_pkg;
8
9 procedure opt64 is
10 procedure assert (T : boolean) is
11 begin
12 if not T then
13 raise program_error;
14 end if;
15 end;
16 begin
17 Encode (1);
18 assert (last_hash = "1");
19 Encode (2);
20 assert (last_hash = "2");
21 Encode (3);
22 assert (last_hash = "3");
23 Encode (6);
24 assert (last_hash = "?");
25 end;