xref: /netbsd-src/external/gpl3/gdb.old/dist/gdb/testsuite/gdb.pascal/gdb11492.pas (revision 8b657b0747480f8989760d71343d6dd33f8d4cf9)
1 {
2  Copyright 2010-2023 Free Software Foundation, Inc.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 }
17 
18 
19 program test_gdb_11492;
20 
21 const
22   LowBound = 1;
23   HighBound = 8;
24 var
25   integer_array : array[LowBound..HighBound] of integer;
26   char_array : array[LowBound..HighBound] of char;
27   i : integer;
28 
29 begin
30   for i:=LowBound to HighBound do
31     begin
32       integer_array[i]:=49+i;
33       char_array[i]:=char(49+i);
34     end;
35   i:=0; { set breakpoint 1 here }
36   char_array[5] := 'X';
37   Writeln('integer array, index 5 is ',integer_array[5]);
38   Writeln('char array, index 5 is ',char_array[5]);
39 end.
40 
41