Debian Codegraph @

gcc/testsuite/gnat.dg/array_bounds_test.adb

raw
1 -- { dg-do run }
2
3 with Ada.Streams; use Ada.Streams;
4 procedure Array_Bounds_Test is
5 One : constant Stream_Element := 1;
6 Two : constant Stream_Element := 2;
7 Sample : constant Stream_Element_Array := (0 => One) & Two;
8 begin
9 if Sample'First /= 0 then
10 raise Program_Error;
11 end if;
12 if Sample'Last /= 1 then
13 raise Program_Error;
14 end if;
15 end Array_Bounds_Test;