import gdb-1999-06-28 snapshot
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.chill / tests2.ch
CommitLineData
c906108c
SS
1-- Copyright (C) 1992 Free Software Foundation, Inc.
2
3-- This program is free software; you can redistribute it and/or modify
4-- it under the terms of the GNU General Public License as published by
5-- the Free Software Foundation; either version 2 of the License, or
6-- (at your option) any later version.
7--
8-- This program is distributed in the hope that it will be useful,
9-- but WITHOUT ANY WARRANTY; without even the implied warranty of
10-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11-- GNU General Public License for more details.
12--
13-- You should have received a copy of the GNU General Public License
14-- along with this program; if not, write to the Free Software
7a292a7a 15-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
c906108c
SS
16
17-- Please email any bugs, comments, and/or additions to this file to:
18-- bug-gdb@prep.ai.mit.edu
19
20--
21-- test program 2 (refer to tests2.exp)
22--
23
24tests2: module;
25
26-- testpattern
27syn pat1 ulong = H'aaaaaaaa;
28syn pat2 ulong = H'55555555;
29
30-- discrete modes
31newmode bytem = struct (
32 p1 ulong,
33 m byte,
34 p2 ulong);
35newmode ubytem = struct (
36 p1 ulong,
37 m ubyte,
38 p2 ulong);
39newmode intm = struct (
40 p1 ulong,
41 m int,
42 p2 ulong);
43newmode uintm = struct (
44 p1 ulong,
45 m uint,
46 p2 ulong);
47newmode longm = struct (
48 p1 ulong,
49 m long,
50 p2 ulong);
51newmode ulongm = struct (
52 p1 ulong,
53 m ulong,
54 p2 ulong);
55newmode boolm = struct (
56 p1 ulong,
57 m bool,
58 p2 ulong);
59newmode charm1 = struct (
60 p1 ulong,
61 m char(4),
62 p2 ulong);
63newmode charm2 = struct (
64 p1 ulong,
65 m char(7),
66 p2 ulong);
67newmode charm3 = struct (
68 p1 ulong,
69 m char(8) varying,
70 p2 ulong);
71newmode charm4 = struct (
72 p1 ulong,
73 m char,
74 p2 ulong);
75newmode bitm1 = struct (
76 p1 ulong,
77 m bit(8),
78 p2 ulong);
79newmode bitm2 = struct (
80 p1 ulong,
81 m bit(10),
82 p2 ulong);
83newmode setm1 = struct (
84 p1 ulong,
85 m set (a, b, c, d, e, f, g, h),
86 p2 ulong);
87newmode nset1 = struct (
88 p1 ulong,
89 m set (na = 2147483648, nb = 1024, nc = 4294967295),
90 p2 ulong);
91newmode rm1 = struct (
92 p1 ulong,
93 m range (lower(byte):upper(byte)),
94 p2 ulong);
95newmode rm2 = struct (
96 p1 ulong,
97 m range (lower(int):upper(int)),
98 p2 ulong);
99newmode rm3 = struct (
100 p1 ulong,
101 m range (lower(long):upper(long)),
102 p2 ulong);
103newmode pm1 = struct (
104 p1 ulong,
105 m powerset set (pa, pb, pc, pd, pe, pf, pg, ph),
106 p2 ulong);
107newmode pm2 = struct (
108 p1 ulong,
109 m powerset int (1:32),
110 p2 ulong);
111-- this should be rejected by the gnuchill compiler !
112newmode pm3 = struct (
113 p1 ulong,
114-- m powerset long (lower(long): upper(long)),
115 p2 ulong);
116newmode refm1 = struct (
117 p1 ulong,
118 m ptr,
119 p2 ulong);
120newmode refm2 = struct (
121 p1 ulong,
122 m ref bytem,
123 p2 ulong);
124newmode prm1 = struct (
125 p1 ulong,
126 m proc (),
127 p2 ulong);
128newmode tim1 = struct (
129 p1 ulong,
130 m time,
131 p2 ulong);
132newmode tim2 = struct (
133 p1 ulong,
134 m duration,
135 p2 ulong);
136newmode rem1 = struct (
137 p1 ulong,
138 m real,
139 p2 ulong);
140newmode rem2 = struct (
141 p1 ulong,
142 m long_real,
143 p2 ulong);
144newmode arrm1 = struct (
145 p1 ulong,
146 m array(1:3, 1:2) int,
147 p2 ulong);
148newmode strum1 = struct (
149 p1 ulong,
150 m struct (a, b int, ch char(4)),
151 p2 ulong);
152
153
154-- dummyfunction for breakpoints
155dummyfunc: proc();
156end dummyfunc;
157
158
159dcl b1 bytem init := [pat1, -128, pat2];
160dcl ub1 ubytem init := [pat1, 0, pat2];
161dcl i1 intm init := [pat1, -32768, pat2];
162dcl ui1 uintm init := [pat1, 0, pat2];
163dcl l1 longm init := [pat1, -2147483648, pat2];
164dcl ul1 ulongm init := [pat1, 0, pat2];
165dcl bo1 boolm init := [pat1, true, pat2];
166dcl c1 charm1 init := [pat1, "1234", pat2];
167dcl c2 charm2 init := [pat1, "1234567", pat2];
168dcl c3 charm3 init := [pat1, "12345678", pat2];
169dcl c4 charm4 init := [pat1, C'00', pat2];
170dcl bi1 bitm1 init := [pat1, B'01011010', pat2];
171dcl bi2 bitm2 init := [pat1, B'1010110101', pat2];
172dcl se1 setm1 init := [pat1, a, pat2];
173dcl nse1 nset1 init := [pat1, na, pat2];
174dcl r1 rm1 init := [pat1, -128, pat2];
175dcl r2 rm2 init := [pat1, -32768, pat2];
176dcl r3 rm3 init := [pat1, -2147483648, pat2];
177dcl p1 pm1 init := [pat1, [pa], pat2];
178dcl p2 pm2 init := [pat1, [1], pat2];
179-- dcl p3 pm3 init := [pat1, [-1], pat2]; -- FIXME: bug in gnuchill
180dcl ref1 refm1 init := [pat1, null, pat2];
181dcl ref2 refm2 init := [pat1, null, pat2];
182dcl pr1 prm1;
183dcl ti1 tim1 init := [pat1, 0, pat2];
184dcl ti2 tim2 init := [pat1, 0, pat2];
185dcl re1 rem1 init := [pat1, 0.0, pat2];
186dcl re2 rem2 init := [pat1, 0.0, pat2];
187dcl arrl1 arrm1 init:=[pat1, [(1:3): [0,0]], pat2];
188dcl strul1 strum1 init := [pat1, [.a: 0, .b: 0, .ch: "0000"], pat2];
189
190pr1 := [pat1, dummyfunc, pat2];
191dummyfunc();
192
193end tests2;
This page took 0.03472 seconds and 4 git commands to generate.