Bug Summary

File:src/gnu/usr.bin/binutils/obj/gdb/f-exp.c
Warning:line 1616, column 6
1st function call argument is an uninitialized value

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple amd64-unknown-openbsd7.0 -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name f-exp.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 1 -pic-is-pie -mframe-pointer=all -relaxed-aliasing -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-feature +retpoline-indirect-calls -target-feature +retpoline-indirect-branches -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/usr/src/gnu/usr.bin/binutils/obj/gdb -resource-dir /usr/local/lib/clang/13.0.0 -D PIE_DEFAULT=1 -I . -I /usr/src/gnu/usr.bin/binutils/gdb -I /usr/src/gnu/usr.bin/binutils/gdb/config -D LOCALEDIR="/usr/share/locale" -D HAVE_CONFIG_H -I /usr/src/gnu/usr.bin/binutils/gdb/../include/opcode -I ../bfd -I /usr/src/gnu/usr.bin/binutils/gdb/../bfd -I /usr/src/gnu/usr.bin/binutils/gdb/../include -I ../intl -I /usr/src/gnu/usr.bin/binutils/gdb/../intl -D MI_OUT=1 -D TUI=1 -internal-isystem /usr/local/lib/clang/13.0.0/include -internal-externc-isystem /usr/include -O2 -fdebug-compilation-dir=/usr/src/gnu/usr.bin/binutils/obj/gdb -ferror-limit 19 -fwrapv -D_RET_PROTECTOR -ret-protector -fgnuc-version=4.2.1 -fcommon -vectorize-loops -vectorize-slp -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-valloc -fno-builtin-free -fno-builtin-strdup -fno-builtin-strndup -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /home/ben/Projects/vmm/scan-build/2022-01-12-194120-40624-1 -x c f-exp.c
1#include <stdlib.h>
2#include <string.h>
3#define YYBYACC1 1
4#define YYMAJOR1 1
5#define YYMINOR9 9
6#define YYLEXf_lex() yylexf_lex()
7#define YYEMPTY-1 -1
8#define yyclearin(f_char=(-1)) (yycharf_char=(YYEMPTY-1))
9#define yyerrok(f_errflag=0) (yyerrflagf_errflag=0)
10#define YYRECOVERING()(f_errflag!=0) (yyerrflagf_errflag!=0)
11#define YYPREFIX"yy" "yy"
12#line 45 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
13
14#include "defs.h"
15#include "gdb_string.h"
16#include "expression.h"
17#include "value.h"
18#include "parser-defs.h"
19#include "language.h"
20#include "f-lang.h"
21#include "bfd.h" /* Required by objfiles.h. */
22#include "symfile.h" /* Required by objfiles.h. */
23#include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
24#include "block.h"
25#include <ctype.h>
26
27/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
28 as well as gratuitiously global symbol names, so we can have multiple
29 yacc generated parsers in gdb. Note that these are only the variables
30 produced by yacc. If other parser generators (bison, byacc, etc) produce
31 additional global names that conflict at link time, then those parser
32 generators need to be fixed instead of adding those names to this list. */
33
34#define yymaxdepthf_maxdepth f_maxdepth
35#define yyparsef_parse f_parse
36#define yylexf_lex f_lex
37#define yyerrorf_error f_error
38#define yylvalf_lval f_lval
39#define yycharf_char f_char
40#define yydebugf_debug f_debug
41#define yypactf_pact f_pact
42#define yyr1f_r1 f_r1
43#define yyr2f_r2 f_r2
44#define yydeff_def f_def
45#define yychkf_chk f_chk
46#define yypgof_pgo f_pgo
47#define yyactf_act f_act
48#define yyexcaf_exca f_exca
49#define yyerrflagf_errflag f_errflag
50#define yynerrsf_nerrs f_nerrs
51#define yypsf_ps f_ps
52#define yypvf_pv f_pv
53#define yysf_s f_s
54#define yy_yysf_yys f_yys
55#define yystatef_state f_state
56#define yytmpf_tmp f_tmp
57#define yyvf_v f_v
58#define yy_yyvf_yyv f_yyv
59#define yyvalf_val f_val
60#define yyllocf_lloc f_lloc
61#define yyredsf_reds f_reds /* With YYDEBUG defined */
62#define yytoksf_toks f_toks /* With YYDEBUG defined */
63#define yynamef_name f_name /* With YYDEBUG defined */
64#define yyrulef_rule f_rule /* With YYDEBUG defined */
65#define yylhsf_yylhs f_yylhs
66#define yylenf_yylen f_yylen
67#define yydefredf_yydefred f_yydefred
68#define yydgotof_yydgoto f_yydgoto
69#define yysindexf_yysindex f_yysindex
70#define yyrindexf_yyrindex f_yyrindex
71#define yygindexf_yygindex f_yygindex
72#define yytablef_yytable f_yytable
73#define yycheckf_yycheck f_yycheck
74
75#ifndef YYDEBUG1
76#define YYDEBUG1 1 /* Default to yydebug support */
77#endif
78
79#define YYFPRINTFparser_fprintf parser_fprintf
80
81int yyparsef_parse (void);
82
83static int yylexf_lex (void);
84
85void yyerrorf_error (char *);
86
87static void growbuf_by_size (int);
88
89static int match_string_literal (void);
90
91#line 129 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
92#ifndef YYSTYPE_DEFINED
93#define YYSTYPE_DEFINED
94typedef union
95 {
96 LONGESTlong lval;
97 struct {
98 LONGESTlong val;
99 struct type *type;
100 } typed_val;
101 DOUBLEST dval;
102 struct symbol *sym;
103 struct type *tval;
104 struct stoken sval;
105 struct ttype tsym;
106 struct symtoken ssym;
107 int voidval;
108 struct block *bval;
109 enum exp_opcode opcode;
110 struct internalvar *ivar;
111
112 struct type **tvec;
113 int *ivec;
114 } YYSTYPE;
115#endif /* YYSTYPE_DEFINED */
116#line 152 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
117/* YYSTYPE gets defined by %union */
118static int parse_number (char *, int, int, YYSTYPE *);
119#define INT257 257
120#define FLOAT258 258
121#define STRING_LITERAL259 259
122#define BOOLEAN_LITERAL260 260
123#define NAME261 261
124#define TYPENAME262 262
125#define NAME_OR_INT263 263
126#define SIZEOF264 264
127#define ERROR265 265
128#define INT_KEYWORD266 266
129#define INT_S2_KEYWORD267 267
130#define LOGICAL_S1_KEYWORD268 268
131#define LOGICAL_S2_KEYWORD269 269
132#define LOGICAL_KEYWORD270 270
133#define REAL_KEYWORD271 271
134#define REAL_S8_KEYWORD272 272
135#define REAL_S16_KEYWORD273 273
136#define COMPLEX_S8_KEYWORD274 274
137#define COMPLEX_S16_KEYWORD275 275
138#define COMPLEX_S32_KEYWORD276 276
139#define BOOL_AND277 277
140#define BOOL_OR278 278
141#define BOOL_NOT279 279
142#define CHARACTER280 280
143#define VARIABLE281 281
144#define ASSIGN_MODIFY282 282
145#define ABOVE_COMMA283 283
146#define EQUAL284 284
147#define NOTEQUAL285 285
148#define LESSTHAN286 286
149#define GREATERTHAN287 287
150#define LEQ288 288
151#define GEQ289 289
152#define LSH290 290
153#define RSH291 291
154#define UNARY292 292
155#define YYERRCODE256 256
156const short yylhsf_yylhs[] =
157 { -1,
158 0, 0, 2, 1, 1, 1, 1, 1, 1, 1,
159 15, 1, 14, 14, 14, 14, 16, 17, 1, 1,
160 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
161 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
162 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
163 4, 10, 10, 9, 9, 9, 9, 9, 8, 8,
164 8, 7, 7, 5, 5, 5, 5, 5, 5, 5,
165 5, 5, 5, 5, 5, 5, 13, 6, 6, 11,
166 11, 11, 12,
167};
168const short yylenf_yylen[] =
169 { 2,
170 1, 1, 1, 3, 2, 2, 2, 2, 2, 2,
171 0, 5, 0, 1, 1, 3, 3, 3, 3, 4,
172 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
173 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
174 3, 1, 1, 1, 1, 1, 4, 1, 1, 1,
175 1, 1, 2, 1, 2, 1, 2, 1, 3, 2,
176 1, 2, 3, 1, 1, 1, 1, 1, 1, 1,
177 1, 1, 1, 1, 1, 1, 1, 1, 3, 1,
178 1, 1, 1,
179};
180const short yydefredf_yydefred[] =
181 { 0,
182 42, 44, 49, 48, 83, 64, 43, 0, 65, 66,
183 70, 69, 68, 71, 72, 73, 74, 75, 76, 0,
184 67, 46, 0, 0, 0, 0, 0, 0, 0, 2,
185 45, 3, 0, 51, 50, 0, 0, 0, 0, 0,
186 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
187 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
188 0, 0, 0, 0, 0, 0, 11, 0, 0, 0,
189 61, 0, 53, 0, 0, 4, 0, 19, 0, 0,
190 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
191 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
192 57, 55, 62, 78, 0, 0, 0, 60, 0, 0,
193 0, 0, 0, 15, 0, 63, 59, 0, 0, 12,
194 79, 0, 0,
195};
196const short yydgotof_yydgoto[] =
197 { 28,
198 42, 30, 31, 104, 33, 105, 71, 72, 73, 34,
199 0, 35, 0, 113, 100, 114, 44,
200};
201const short yysindexf_yysindex[] =
202 { 1080,
203 0, 0, 0, 0, 0, 0, 0, 1044, 0, 0,
204 0, 0, 0, 0, 0, 0, 0, 0, 0, 1105,
205 0, 0, 1105, 1105, 1105, 1080, 1105, 0, 991, 0,
206 0, 0, -29, 0, 0, 1080, -36, -36, -36, -36,
207 -36, 938, -22, -8, -36, 1105, 1105, 1105, 1105, 1105,
208 1105, 1105, 1105, 1105, 1105, 1105, 1105, 1105, 1105, 1105,
209 1105, 1105, 1105, 1105, 1105, 1105, 0, -29, -29, 1123,
210 0, -34, 0, -4, 1105, 0, 1105, 0, 898, 1006,
211 991, 991, 951, 1029, 64, 681, 681, -35, -35, -35,
212 -35, -15, -15, 227, 145, 145, -36, -36, -36, 1105,
213 0, 0, 0, 0, -41, 11, 1177, 0, 1159, 991,
214 -36, 966, -26, 0, -47, 0, 0, 1105, 1105, 0,
215 0, 991, 991,};
216const short yyrindexf_yyrindex[] =
217 { 0,
218 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
219 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
220 0, 0, 0, 0, 0, 0, 0, 0, 41, 0,
221 0, 0, 35, 0, 0, 0, 1, 26, 55, 94,
222 122, 0, 0, 0, 153, 0, 0, 0, 0, 0,
223 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
224 0, 0, 0, 0, 0, 0, 0, 36, 133, 0,
225 0, 134, 0, 0, 0, 0, 0, 0, 17, 47,
226 16, 86, 535, 82, 199, 110, 562, 825, 871, 890,
227 916, 617, 636, 590, 544, 571, 207, 414, 462, -21,
228 0, 0, 0, 0, 0, 0, 0, 0, 487, 12,
229 516, -20, 0, 0, 0, 0, 0, 0, 0, 0,
230 0, -10, 10,};
231const short yygindexf_yygindex[] =
232 { 0,
233 1454, 0, 0, 14, 0, 0, -16, 0, 77, 0,
234 0, 0, 0, 0, 0, 0, 0,
235};
236#define YYTABLESIZE1573 1573
237const short yytablef_yytable[] =
238 { 116,
239 10, 66, 115, 67, 67, 107, 64, 62, 68, 63,
240 70, 65, 69, 32, 120, 41, 38, 119, 77, 13,
241 14, 66, 13, 14, 67, 8, 64, 62, 61, 63,
242 17, 65, 78, 17, 52, 56, 109, 10, 10, 43,
243 1, 10, 10, 10, 10, 10, 39, 10, 61, 74,
244 16, 117, 18, 16, 6, 108, 41, 38, 10, 41,
245 38, 10, 8, 8, 10, 0, 8, 8, 8, 8,
246 8, 0, 8, 41, 38, 52, 56, 38, 52, 56,
247 0, 36, 0, 8, 0, 40, 8, 39, 0, 8,
248 39, 6, 6, 7, 10, 6, 6, 6, 6, 6,
249 66, 6, 0, 67, 39, 64, 62, 39, 63, 29,
250 65, 0, 6, 0, 0, 6, 0, 0, 6, 8,
251 0, 5, 36, 0, 10, 36, 40, 61, 121, 40,
252 7, 7, 54, 58, 7, 7, 7, 7, 7, 36,
253 7, 0, 36, 40, 101, 102, 106, 29, 6, 8,
254 29, 7, 9, 29, 7, 0, 0, 7, 5, 5,
255 0, 0, 5, 5, 5, 5, 5, 29, 5, 0,
256 29, 0, 0, 54, 58, 36, 54, 58, 6, 5,
257 0, 66, 5, 0, 67, 5, 64, 7, 0, 9,
258 9, 65, 0, 9, 9, 9, 9, 9, 35, 9,
259 0, 0, 0, 29, 0, 36, 22, 0, 0, 0,
260 9, 0, 0, 9, 6, 5, 9, 7, 9, 10,
261 11, 12, 13, 14, 15, 16, 17, 18, 19, 0,
262 0, 0, 21, 29, 0, 0, 35, 0, 0, 35,
263 0, 0, 35, 22, 22, 5, 9, 22, 22, 22,
264 22, 22, 0, 22, 59, 60, 35, 0, 0, 35,
265 0, 0, 0, 66, 22, 0, 67, 22, 64, 62,
266 22, 63, 0, 65, 0, 0, 9, 10, 10, 0,
267 0, 0, 10, 0, 10, 10, 10, 10, 10, 10,
268 10, 10, 35, 38, 38, 0, 0, 0, 38, 0,
269 22, 0, 8, 8, 0, 0, 0, 8, 0, 8,
270 8, 8, 8, 8, 8, 8, 8, 0, 0, 0,
271 0, 0, 35, 0, 39, 0, 0, 0, 39, 0,
272 22, 6, 6, 0, 0, 0, 6, 0, 6, 6,
273 6, 6, 6, 6, 6, 6, 0, 53, 54, 55,
274 56, 57, 58, 59, 60, 0, 0, 0, 36, 36,
275 0, 0, 0, 36, 0, 0, 0, 0, 0, 0,
276 7, 7, 0, 0, 0, 7, 0, 7, 7, 7,
277 7, 7, 7, 7, 7, 0, 29, 29, 0, 0,
278 0, 29, 0, 29, 29, 0, 0, 0, 5, 5,
279 0, 0, 0, 5, 0, 5, 5, 5, 5, 5,
280 5, 5, 5, 23, 0, 0, 0, 0, 0, 0,
281 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
282 9, 0, 0, 0, 9, 0, 9, 9, 9, 9,
283 9, 9, 9, 9, 0, 0, 0, 0, 0, 0,
284 23, 23, 0, 0, 23, 23, 23, 23, 23, 0,
285 23, 24, 0, 0, 0, 0, 0, 0, 0, 0,
286 0, 23, 0, 0, 23, 35, 35, 23, 0, 0,
287 35, 0, 0, 22, 22, 0, 47, 0, 22, 0,
288 22, 22, 22, 22, 22, 22, 22, 22, 24, 24,
289 0, 0, 24, 24, 24, 24, 24, 23, 24, 0,
290 0, 0, 0, 0, 0, 20, 0, 0, 0, 24,
291 0, 0, 24, 47, 47, 24, 0, 47, 47, 47,
292 47, 47, 0, 47, 37, 0, 0, 23, 0, 0,
293 0, 0, 0, 25, 47, 0, 0, 47, 0, 0,
294 47, 0, 20, 20, 0, 24, 20, 20, 20, 20,
295 20, 30, 20, 0, 0, 0, 0, 0, 0, 0,
296 26, 0, 0, 20, 0, 37, 20, 0, 37, 20,
297 47, 25, 0, 0, 25, 24, 25, 25, 25, 21,
298 0, 0, 37, 0, 0, 37, 0, 0, 0, 30,
299 0, 25, 30, 0, 25, 30, 0, 25, 26, 20,
300 47, 26, 0, 26, 26, 26, 27, 0, 0, 30,
301 0, 0, 30, 0, 0, 0, 0, 21, 26, 0,
302 21, 26, 0, 21, 26, 28, 0, 25, 0, 20,
303 0, 0, 0, 0, 0, 0, 0, 21, 0, 0,
304 21, 0, 0, 21, 27, 30, 0, 27, 37, 0,
305 27, 0, 0, 0, 26, 0, 0, 25, 0, 0,
306 0, 0, 0, 28, 27, 0, 28, 27, 0, 28,
307 0, 0, 0, 21, 0, 30, 0, 0, 0, 0,
308 23, 23, 0, 28, 26, 23, 28, 23, 23, 23,
309 23, 23, 23, 23, 23, 0, 0, 0, 0, 0,
310 27, 0, 0, 21, 0, 0, 0, 66, 0, 0,
311 67, 0, 64, 62, 0, 63, 0, 65, 0, 28,
312 0, 0, 0, 0, 0, 0, 0, 0, 24, 24,
313 27, 0, 0, 24, 61, 24, 24, 24, 24, 24,
314 24, 24, 24, 0, 0, 0, 0, 0, 0, 28,
315 0, 0, 0, 47, 47, 0, 0, 0, 47, 0,
316 47, 47, 47, 47, 47, 47, 47, 47, 0, 0,
317 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
318 0, 0, 20, 20, 0, 0, 0, 20, 0, 20,
319 20, 20, 20, 20, 20, 20, 20, 0, 0, 0,
320 0, 37, 37, 0, 0, 0, 37, 0, 0, 0,
321 25, 25, 0, 0, 33, 25, 0, 25, 25, 25,
322 25, 25, 25, 25, 25, 0, 0, 0, 30, 30,
323 0, 0, 0, 30, 0, 30, 30, 26, 26, 0,
324 0, 0, 26, 0, 26, 26, 26, 26, 26, 26,
325 26, 26, 33, 0, 0, 33, 21, 21, 33, 0,
326 34, 21, 0, 21, 21, 21, 21, 21, 21, 21,
327 21, 0, 33, 0, 0, 33, 0, 0, 0, 31,
328 0, 0, 0, 27, 27, 0, 0, 0, 27, 0,
329 27, 27, 27, 27, 27, 27, 27, 27, 34, 0,
330 0, 34, 28, 28, 34, 32, 0, 28, 33, 28,
331 28, 28, 28, 28, 28, 28, 28, 31, 34, 0,
332 31, 34, 0, 31, 66, 52, 0, 67, 0, 64,
333 62, 0, 63, 0, 65, 0, 0, 31, 33, 0,
334 31, 0, 0, 32, 0, 0, 32, 0, 0, 32,
335 0, 61, 0, 0, 34, 0, 55, 56, 57, 58,
336 59, 60, 0, 32, 66, 52, 32, 67, 76, 64,
337 62, 75, 63, 31, 65, 0, 0, 66, 52, 0,
338 67, 51, 64, 62, 34, 63, 0, 65, 49, 0,
339 0, 61, 66, 52, 0, 67, 0, 64, 62, 32,
340 63, 0, 65, 31, 61, 0, 0, 0, 0, 0,
341 0, 50, 0, 118, 0, 0, 49, 66, 52, 61,
342 67, 51, 64, 62, 0, 63, 0, 65, 0, 32,
343 0, 0, 66, 52, 51, 67, 0, 64, 62, 0,
344 63, 49, 65, 0, 61, 0, 0, 0, 0, 51,
345 0, 50, 0, 0, 0, 66, 52, 0, 67, 61,
346 64, 62, 0, 63, 0, 65, 0, 0, 0, 0,
347 0, 23, 0, 36, 51, 25, 0, 0, 24, 50,
348 0, 0, 61, 0, 0, 0, 0, 0, 0, 51,
349 0, 33, 33, 0, 0, 0, 33, 0, 33, 33,
350 33, 33, 33, 33, 50, 0, 0, 23, 0, 26,
351 0, 25, 0, 0, 24, 0, 0, 0, 0, 50,
352 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
353 0, 0, 23, 0, 26, 0, 25, 34, 34, 24,
354 0, 0, 34, 0, 34, 34, 34, 34, 34, 34,
355 68, 0, 70, 103, 69, 0, 31, 31, 0, 27,
356 0, 31, 0, 31, 31, 31, 31, 31, 31, 0,
357 0, 53, 54, 55, 56, 57, 58, 59, 60, 0,
358 0, 0, 32, 32, 0, 0, 0, 32, 26, 32,
359 32, 32, 32, 32, 32, 27, 0, 0, 0, 0,
360 0, 0, 0, 0, 46, 47, 0, 103, 0, 48,
361 0, 53, 54, 55, 56, 57, 58, 59, 60, 0,
362 27, 0, 0, 0, 53, 54, 55, 56, 57, 58,
363 59, 60, 46, 47, 0, 0, 0, 48, 0, 53,
364 54, 55, 56, 57, 58, 59, 60, 0, 0, 0,
365 0, 0, 0, 0, 0, 0, 0, 46, 47, 0,
366 0, 0, 48, 0, 53, 54, 55, 56, 57, 58,
367 59, 60, 46, 0, 27, 0, 0, 0, 0, 53,
368 54, 55, 56, 57, 58, 59, 60, 0, 0, 0,
369 1, 2, 3, 4, 5, 0, 7, 8, 0, 0,
370 0, 0, 53, 54, 55, 56, 57, 58, 59, 60,
371 0, 0, 20, 0, 22, 0, 0, 0, 0, 0,
372 0, 0, 0, 0, 0, 0, 1, 2, 3, 4,
373 5, 6, 7, 8, 0, 9, 10, 11, 12, 13,
374 14, 15, 16, 17, 18, 19, 0, 0, 20, 21,
375 22, 1, 2, 3, 4, 5, 0, 7, 8, 0,
376 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
377 0, 0, 0, 20, 6, 22, 0, 0, 9, 10,
378 11, 12, 13, 14, 15, 16, 17, 18, 19, 0,
379 0, 0, 21, 0, 0, 0, 0, 0, 0, 0,
380 0, 0, 0, 0, 0, 1, 2, 3, 4, 5,
381 0, 7, 8, 0, 0, 0, 0, 0, 0, 0,
382 0, 0, 0, 0, 0, 0, 0, 20, 6, 22,
383 0, 0, 9, 10, 11, 12, 13, 14, 15, 16,
384 17, 18, 19, 29, 0, 0, 21, 0, 0, 0,
385 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
386 0, 0, 0, 38, 0, 0, 39, 40, 41, 0,
387 45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
388 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,
389 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
390 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
391 0, 0, 0, 0, 0, 0, 0, 0, 110, 0,
392 111, 0, 0, 0, 0, 0, 0, 0, 0, 0,
393 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
394 0, 0, 0, 112, 0, 0, 0, 0, 0, 0,
395 0, 0, 111, 0, 0, 0, 0, 0, 0, 0,
396 0, 122, 123,
397};
398const short yycheckf_yycheck[] =
399 { 41,
400 0, 37, 44, 40, 40, 40, 42, 43, 38, 45,
401 40, 47, 42, 0, 41, 0, 0, 44, 41, 41,
402 41, 37, 44, 44, 40, 0, 42, 43, 64, 45,
403 41, 47, 41, 44, 0, 0, 41, 37, 38, 26,
404 0, 41, 42, 43, 44, 45, 0, 47, 64, 36,
405 41, 41, 41, 44, 0, 72, 41, 41, 58, 44,
406 44, 61, 37, 38, 64, -1, 41, 42, 43, 44,
407 45, -1, 47, 58, 58, 41, 41, 61, 44, 44,
408 -1, 0, -1, 58, -1, 0, 61, 41, -1, 64,
409 44, 37, 38, 0, 94, 41, 42, 43, 44, 45,
410 37, 47, -1, 40, 58, 42, 43, 61, 45, 0,
411 47, -1, 58, -1, -1, 61, -1, -1, 64, 94,
412 -1, 0, 41, -1, 124, 44, 41, 64, 115, 44,
413 37, 38, 0, 0, 41, 42, 43, 44, 45, 58,
414 47, -1, 61, 58, 68, 69, 70, 38, 94, 124,
415 41, 58, 0, 44, 61, -1, -1, 64, 37, 38,
416 -1, -1, 41, 42, 43, 44, 45, 58, 47, -1,
417 61, -1, -1, 41, 41, 94, 44, 44, 124, 58,
418 -1, 37, 61, -1, 40, 64, 42, 94, -1, 37,
419 38, 47, -1, 41, 42, 43, 44, 45, 0, 47,
420 -1, -1, -1, 94, -1, 124, 0, -1, -1, -1,
421 58, -1, -1, 61, 262, 94, 64, 124, 266, 267,
422 268, 269, 270, 271, 272, 273, 274, 275, 276, -1,
423 -1, -1, 280, 124, -1, -1, 38, -1, -1, 41,
424 -1, -1, 44, 37, 38, 124, 94, 41, 42, 43,
425 44, 45, -1, 47, 290, 291, 58, -1, -1, 61,
426 -1, -1, -1, 37, 58, -1, 40, 61, 42, 43,
427 64, 45, -1, 47, -1, -1, 124, 277, 278, -1,
428 -1, -1, 282, -1, 284, 285, 286, 287, 288, 289,
429 290, 291, 94, 277, 278, -1, -1, -1, 282, -1,
430 94, -1, 277, 278, -1, -1, -1, 282, -1, 284,
431 285, 286, 287, 288, 289, 290, 291, -1, -1, -1,
432 -1, -1, 124, -1, 278, -1, -1, -1, 282, -1,
433 124, 277, 278, -1, -1, -1, 282, -1, 284, 285,
434 286, 287, 288, 289, 290, 291, -1, 284, 285, 286,
435 287, 288, 289, 290, 291, -1, -1, -1, 277, 278,
436 -1, -1, -1, 282, -1, -1, -1, -1, -1, -1,
437 277, 278, -1, -1, -1, 282, -1, 284, 285, 286,
438 287, 288, 289, 290, 291, -1, 277, 278, -1, -1,
439 -1, 282, -1, 284, 285, -1, -1, -1, 277, 278,
440 -1, -1, -1, 282, -1, 284, 285, 286, 287, 288,
441 289, 290, 291, 0, -1, -1, -1, -1, -1, -1,
442 -1, -1, -1, -1, -1, -1, -1, -1, -1, 277,
443 278, -1, -1, -1, 282, -1, 284, 285, 286, 287,
444 288, 289, 290, 291, -1, -1, -1, -1, -1, -1,
445 37, 38, -1, -1, 41, 42, 43, 44, 45, -1,
446 47, 0, -1, -1, -1, -1, -1, -1, -1, -1,
447 -1, 58, -1, -1, 61, 277, 278, 64, -1, -1,
448 282, -1, -1, 277, 278, -1, 0, -1, 282, -1,
449 284, 285, 286, 287, 288, 289, 290, 291, 37, 38,
450 -1, -1, 41, 42, 43, 44, 45, 94, 47, -1,
451 -1, -1, -1, -1, -1, 0, -1, -1, -1, 58,
452 -1, -1, 61, 37, 38, 64, -1, 41, 42, 43,
453 44, 45, -1, 47, 0, -1, -1, 124, -1, -1,
454 -1, -1, -1, 0, 58, -1, -1, 61, -1, -1,
455 64, -1, 37, 38, -1, 94, 41, 42, 43, 44,
456 45, 0, 47, -1, -1, -1, -1, -1, -1, -1,
457 0, -1, -1, 58, -1, 41, 61, -1, 44, 64,
458 94, 38, -1, -1, 41, 124, 43, 44, 45, 0,
459 -1, -1, 58, -1, -1, 61, -1, -1, -1, 38,
460 -1, 58, 41, -1, 61, 44, -1, 64, 38, 94,
461 124, 41, -1, 43, 44, 45, 0, -1, -1, 58,
462 -1, -1, 61, -1, -1, -1, -1, 38, 58, -1,
463 41, 61, -1, 44, 64, 0, -1, 94, -1, 124,
464 -1, -1, -1, -1, -1, -1, -1, 58, -1, -1,
465 61, -1, -1, 64, 38, 94, -1, 41, 124, -1,
466 44, -1, -1, -1, 94, -1, -1, 124, -1, -1,
467 -1, -1, -1, 38, 58, -1, 41, 61, -1, 44,
468 -1, -1, -1, 94, -1, 124, -1, -1, -1, -1,
469 277, 278, -1, 58, 124, 282, 61, 284, 285, 286,
470 287, 288, 289, 290, 291, -1, -1, -1, -1, -1,
471 94, -1, -1, 124, -1, -1, -1, 37, -1, -1,
472 40, -1, 42, 43, -1, 45, -1, 47, -1, 94,
473 -1, -1, -1, -1, -1, -1, -1, -1, 277, 278,
474 124, -1, -1, 282, 64, 284, 285, 286, 287, 288,
475 289, 290, 291, -1, -1, -1, -1, -1, -1, 124,
476 -1, -1, -1, 277, 278, -1, -1, -1, 282, -1,
477 284, 285, 286, 287, 288, 289, 290, 291, -1, -1,
478 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
479 -1, -1, 277, 278, -1, -1, -1, 282, -1, 284,
480 285, 286, 287, 288, 289, 290, 291, -1, -1, -1,
481 -1, 277, 278, -1, -1, -1, 282, -1, -1, -1,
482 277, 278, -1, -1, 0, 282, -1, 284, 285, 286,
483 287, 288, 289, 290, 291, -1, -1, -1, 277, 278,
484 -1, -1, -1, 282, -1, 284, 285, 277, 278, -1,
485 -1, -1, 282, -1, 284, 285, 286, 287, 288, 289,
486 290, 291, 38, -1, -1, 41, 277, 278, 44, -1,
487 0, 282, -1, 284, 285, 286, 287, 288, 289, 290,
488 291, -1, 58, -1, -1, 61, -1, -1, -1, 0,
489 -1, -1, -1, 277, 278, -1, -1, -1, 282, -1,
490 284, 285, 286, 287, 288, 289, 290, 291, 38, -1,
491 -1, 41, 277, 278, 44, 0, -1, 282, 94, 284,
492 285, 286, 287, 288, 289, 290, 291, 38, 58, -1,
493 41, 61, -1, 44, 37, 38, -1, 40, -1, 42,
494 43, -1, 45, -1, 47, -1, -1, 58, 124, -1,
495 61, -1, -1, 38, -1, -1, 41, -1, -1, 44,
496 -1, 64, -1, -1, 94, -1, 286, 287, 288, 289,
497 290, 291, -1, 58, 37, 38, 61, 40, 41, 42,
498 43, 44, 45, 94, 47, -1, -1, 37, 38, -1,
499 40, 94, 42, 43, 124, 45, -1, 47, 61, -1,
500 -1, 64, 37, 38, -1, 40, -1, 42, 43, 94,
501 45, -1, 47, 124, 64, -1, -1, -1, -1, -1,
502 -1, 124, -1, 58, -1, -1, 61, 37, 38, 64,
503 40, 94, 42, 43, -1, 45, -1, 47, -1, 124,
504 -1, -1, 37, 38, 94, 40, -1, 42, 43, -1,
505 45, 61, 47, -1, 64, -1, -1, -1, -1, 94,
506 -1, 124, -1, -1, -1, 37, 38, -1, 40, 64,
507 42, 43, -1, 45, -1, 47, -1, -1, -1, -1,
508 -1, 38, -1, 40, 94, 42, -1, -1, 45, 124,
509 -1, -1, 64, -1, -1, -1, -1, -1, -1, 94,
510 -1, 277, 278, -1, -1, -1, 282, -1, 284, 285,
511 286, 287, 288, 289, 124, -1, -1, 38, -1, 40,
512 -1, 42, -1, -1, 45, -1, -1, -1, -1, 124,
513 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
514 -1, -1, 38, -1, 40, -1, 42, 277, 278, 45,
515 -1, -1, 282, -1, 284, 285, 286, 287, 288, 289,
516 38, -1, 40, 41, 42, -1, 277, 278, -1, 126,
517 -1, 282, -1, 284, 285, 286, 287, 288, 289, -1,
518 -1, 284, 285, 286, 287, 288, 289, 290, 291, -1,
519 -1, -1, 277, 278, -1, -1, -1, 282, 40, 284,
520 285, 286, 287, 288, 289, 126, -1, -1, -1, -1,
521 -1, -1, -1, -1, 277, 278, -1, 41, -1, 282,
522 -1, 284, 285, 286, 287, 288, 289, 290, 291, -1,
523 126, -1, -1, -1, 284, 285, 286, 287, 288, 289,
524 290, 291, 277, 278, -1, -1, -1, 282, -1, 284,
525 285, 286, 287, 288, 289, 290, 291, -1, -1, -1,
526 -1, -1, -1, -1, -1, -1, -1, 277, 278, -1,
527 -1, -1, 282, -1, 284, 285, 286, 287, 288, 289,
528 290, 291, 277, -1, 126, -1, -1, -1, -1, 284,
529 285, 286, 287, 288, 289, 290, 291, -1, -1, -1,
530 257, 258, 259, 260, 261, -1, 263, 264, -1, -1,
531 -1, -1, 284, 285, 286, 287, 288, 289, 290, 291,
532 -1, -1, 279, -1, 281, -1, -1, -1, -1, -1,
533 -1, -1, -1, -1, -1, -1, 257, 258, 259, 260,
534 261, 262, 263, 264, -1, 266, 267, 268, 269, 270,
535 271, 272, 273, 274, 275, 276, -1, -1, 279, 280,
536 281, 257, 258, 259, 260, 261, -1, 263, 264, -1,
537 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
538 -1, -1, -1, 279, 262, 281, -1, -1, 266, 267,
539 268, 269, 270, 271, 272, 273, 274, 275, 276, -1,
540 -1, -1, 280, -1, -1, -1, -1, -1, -1, -1,
541 -1, -1, -1, -1, -1, 257, 258, 259, 260, 261,
542 -1, 263, 264, -1, -1, -1, -1, -1, -1, -1,
543 -1, -1, -1, -1, -1, -1, -1, 279, 262, 281,
544 -1, -1, 266, 267, 268, 269, 270, 271, 272, 273,
545 274, 275, 276, 0, -1, -1, 280, -1, -1, -1,
546 -1, 8, -1, -1, -1, -1, -1, -1, -1, -1,
547 -1, -1, -1, 20, -1, -1, 23, 24, 25, -1,
548 27, -1, -1, -1, -1, -1, -1, -1, -1, -1,
549 -1, -1, -1, -1, -1, -1, -1, -1, -1, 46,
550 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
551 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
552 -1, -1, -1, -1, -1, -1, -1, -1, 75, -1,
553 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
554 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
555 -1, -1, -1, 100, -1, -1, -1, -1, -1, -1,
556 -1, -1, 109, -1, -1, -1, -1, -1, -1, -1,
557 -1, 118, 119,
558};
559#define YYFINAL28 28
560#ifndef YYDEBUG1
561#define YYDEBUG1 0
562#endif
563#define YYMAXTOKEN292 292
564#if YYDEBUG1
565const char * const yynamef_name[] =
566 {
567"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5680,0,0,"'%'","'&'",0,"'('","')'","'*'","'+'","','","'-'",0,"'/'",0,0,0,0,0,0,0,0,
5690,0,"':'",0,0,"'='",0,"'?'","'@'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5700,0,0,0,0,0,"'^'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
571"'|'",0,"'~'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5720,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5730,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"INT","FLOAT","STRING_LITERAL",
575"BOOLEAN_LITERAL","NAME","TYPENAME","NAME_OR_INT","SIZEOF","ERROR",
576"INT_KEYWORD","INT_S2_KEYWORD","LOGICAL_S1_KEYWORD","LOGICAL_S2_KEYWORD",
577"LOGICAL_KEYWORD","REAL_KEYWORD","REAL_S8_KEYWORD","REAL_S16_KEYWORD",
578"COMPLEX_S8_KEYWORD","COMPLEX_S16_KEYWORD","COMPLEX_S32_KEYWORD","BOOL_AND",
579"BOOL_OR","BOOL_NOT","CHARACTER","VARIABLE","ASSIGN_MODIFY","ABOVE_COMMA",
580"EQUAL","NOTEQUAL","LESSTHAN","GREATERTHAN","LEQ","GEQ","LSH","RSH","UNARY",
581};
582const char * const yyrulef_rule[] =
583 {"$accept : start",
584"start : exp",
585"start : type_exp",
586"type_exp : type",
587"exp : '(' exp ')'",
588"exp : '*' exp",
589"exp : '&' exp",
590"exp : '-' exp",
591"exp : BOOL_NOT exp",
592"exp : '~' exp",
593"exp : SIZEOF exp",
594"$$1 :",
595"exp : exp '(' $$1 arglist ')'",
596"arglist :",
597"arglist : exp",
598"arglist : substring",
599"arglist : arglist ',' exp",
600"substring : exp ':' exp",
601"complexnum : exp ',' exp",
602"exp : '(' complexnum ')'",
603"exp : '(' type ')' exp",
604"exp : exp '@' exp",
605"exp : exp '*' exp",
606"exp : exp '/' exp",
607"exp : exp '%' exp",
608"exp : exp '+' exp",
609"exp : exp '-' exp",
610"exp : exp LSH exp",
611"exp : exp RSH exp",
612"exp : exp EQUAL exp",
613"exp : exp NOTEQUAL exp",
614"exp : exp LEQ exp",
615"exp : exp GEQ exp",
616"exp : exp LESSTHAN exp",
617"exp : exp GREATERTHAN exp",
618"exp : exp '&' exp",
619"exp : exp '^' exp",
620"exp : exp '|' exp",
621"exp : exp BOOL_AND exp",
622"exp : exp BOOL_OR exp",
623"exp : exp '=' exp",
624"exp : exp ASSIGN_MODIFY exp",
625"exp : INT",
626"exp : NAME_OR_INT",
627"exp : FLOAT",
628"exp : variable",
629"exp : VARIABLE",
630"exp : SIZEOF '(' type ')'",
631"exp : BOOLEAN_LITERAL",
632"exp : STRING_LITERAL",
633"variable : name_not_typename",
634"type : ptype",
635"ptype : typebase",
636"ptype : typebase abs_decl",
637"abs_decl : '*'",
638"abs_decl : '*' abs_decl",
639"abs_decl : '&'",
640"abs_decl : '&' abs_decl",
641"abs_decl : direct_abs_decl",
642"direct_abs_decl : '(' abs_decl ')'",
643"direct_abs_decl : direct_abs_decl func_mod",
644"direct_abs_decl : func_mod",
645"func_mod : '(' ')'",
646"func_mod : '(' nonempty_typelist ')'",
647"typebase : TYPENAME",
648"typebase : INT_KEYWORD",
649"typebase : INT_S2_KEYWORD",
650"typebase : CHARACTER",
651"typebase : LOGICAL_KEYWORD",
652"typebase : LOGICAL_S2_KEYWORD",
653"typebase : LOGICAL_S1_KEYWORD",
654"typebase : REAL_KEYWORD",
655"typebase : REAL_S8_KEYWORD",
656"typebase : REAL_S16_KEYWORD",
657"typebase : COMPLEX_S8_KEYWORD",
658"typebase : COMPLEX_S16_KEYWORD",
659"typebase : COMPLEX_S32_KEYWORD",
660"typename : TYPENAME",
661"nonempty_typelist : type",
662"nonempty_typelist : nonempty_typelist ',' type",
663"name : NAME",
664"name : TYPENAME",
665"name : NAME_OR_INT",
666"name_not_typename : NAME",
667};
668#endif
669#ifdef YYSTACKSIZE10000
670#undef YYMAXDEPTH10000
671#define YYMAXDEPTH10000 YYSTACKSIZE10000
672#else
673#ifdef YYMAXDEPTH10000
674#define YYSTACKSIZE10000 YYMAXDEPTH10000
675#else
676#define YYSTACKSIZE10000 10000
677#define YYMAXDEPTH10000 10000
678#endif
679#endif
680#define YYINITSTACKSIZE200 200
681/* LINTUSED */
682int yydebugf_debug;
683int yynerrsf_nerrs;
684int yyerrflagf_errflag;
685int yycharf_char;
686short *yyssp;
687YYSTYPE *yyvsp;
688YYSTYPE yyvalf_val;
689YYSTYPE yylvalf_lval;
690short *yyss;
691short *yysslim;
692YYSTYPE *yyvs;
693unsigned int yystacksize;
694int yyparsef_parse(void);
695#line 635 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
696
697/* Take care of parsing a number (anything that starts with a digit).
698 Set yylval and return the token type; update lexptr.
699 LEN is the number of characters in it. */
700
701/*** Needs some error checking for the float case ***/
702
703static int
704parse_number (p, len, parsed_float, putithere)
705 char *p;
706 int len;
707 int parsed_float;
708 YYSTYPE *putithere;
709{
710 LONGESTlong n = 0;
711 LONGESTlong prevn = 0;
712 int c;
713 int base = input_radix;
714 int unsigned_p = 0;
715 int long_p = 0;
716 ULONGESTunsigned long high_bit;
717 struct type *signed_type;
718 struct type *unsigned_type;
719
720 if (parsed_float
27.1
'parsed_float' is 0
)
28
Taking false branch
721 {
722 /* It's a float since it contains a point or an exponent. */
723 /* [dD] is not understood as an exponent by atof, change it to 'e'. */
724 char *tmp, *tmp2;
725
726 tmp = xstrdup (p);
727 for (tmp2 = tmp; *tmp2; ++tmp2)
728 if (*tmp2 == 'd' || *tmp2 == 'D')
729 *tmp2 = 'e';
730 putithere->dval = atof (tmp);
731 free (tmp);
732 return FLOAT258;
733 }
734
735 /* Handle base-switching prefixes 0x, 0t, 0d, 0 */
736 if (p[0] == '0')
29
Assuming the condition is false
30
Taking false branch
737 switch (p[1])
738 {
739 case 'x':
740 case 'X':
741 if (len >= 3)
742 {
743 p += 2;
744 base = 16;
745 len -= 2;
746 }
747 break;
748
749 case 't':
750 case 'T':
751 case 'd':
752 case 'D':
753 if (len >= 3)
754 {
755 p += 2;
756 base = 10;
757 len -= 2;
758 }
759 break;
760
761 default:
762 base = 8;
763 break;
764 }
765
766 while (len-- > 0)
31
Assuming the condition is true
32
Loop condition is true. Entering loop body
767 {
768 c = *p++;
769 if (isupper (c))
33
Taking false branch
770 c = tolower (c);
771 if (len == 0 && c == 'l')
34
Assuming 'len' is not equal to 0
772 long_p = 1;
773 else if (len
34.1
'len' is not equal to 0
== 0 && c == 'u')
774 unsigned_p = 1;
775 else
776 {
777 int i;
778 if (c >= '0' && c <= '9')
35
Assuming the condition is false
779 i = c - '0';
780 else if (c >= 'a' && c <= 'f')
781 i = c - 'a' + 10;
782 else
783 return ERROR265; /* Char not a digit */
36
Returning without writing to 'putithere->typed_val.type'
784 if (i >= base)
785 return ERROR265; /* Invalid digit in this base */
786 n *= base;
787 n += i;
788 }
789 /* Portably test for overflow (only works for nonzero values, so make
790 a second check for zero). */
791 if ((prevn >= n) && n != 0)
792 unsigned_p=1; /* Try something unsigned */
793 /* If range checking enabled, portably test for unsigned overflow. */
794 if (RANGE_CHECK(range_check != range_check_off) && n != 0)
795 {
796 if ((unsigned_p && (unsigned)prevn >= (unsigned)n))
797 range_error("Overflow on numeric constant.");
798 }
799 prevn = n;
800 }
801
802 /* If the number is too big to be an int, or it's got an l suffix
803 then it's a long. Work out if this has to be a long by
804 shifting right and and seeing if anything remains, and the
805 target int size is different to the target long size.
806
807 In the expression below, we could have tested
808 (n >> TARGET_INT_BIT)
809 to see if it was zero,
810 but too many compilers warn about that, when ints and longs
811 are the same size. So we shift it twice, with fewer bits
812 each time, for the same result. */
813
814 if ((TARGET_INT_BIT(gdbarch_int_bit (current_gdbarch)) != TARGET_LONG_BIT(gdbarch_long_bit (current_gdbarch))
815 && ((n >> 2) >> (TARGET_INT_BIT(gdbarch_int_bit (current_gdbarch))-2))) /* Avoid shift warning */
816 || long_p)
817 {
818 high_bit = ((ULONGESTunsigned long)1) << (TARGET_LONG_BIT(gdbarch_long_bit (current_gdbarch))-1);
819 unsigned_type = builtin_type_unsigned_long;
820 signed_type = builtin_type_long;
821 }
822 else
823 {
824 high_bit = ((ULONGESTunsigned long)1) << (TARGET_INT_BIT(gdbarch_int_bit (current_gdbarch))-1);
825 unsigned_type = builtin_type_unsigned_int;
826 signed_type = builtin_type_int;
827 }
828
829 putithere->typed_val.val = n;
830
831 /* If the high bit of the worked out type is set then this number
832 has to be unsigned. */
833
834 if (unsigned_p || (n & high_bit))
835 putithere->typed_val.type = unsigned_type;
836 else
837 putithere->typed_val.type = signed_type;
838
839 return INT257;
840}
841
842struct token
843{
844 char *operator;
845 int token;
846 enum exp_opcode opcode;
847};
848
849static const struct token dot_ops[] =
850{
851 { ".and.", BOOL_AND277, BINOP_END },
852 { ".AND.", BOOL_AND277, BINOP_END },
853 { ".or.", BOOL_OR278, BINOP_END },
854 { ".OR.", BOOL_OR278, BINOP_END },
855 { ".not.", BOOL_NOT279, BINOP_END },
856 { ".NOT.", BOOL_NOT279, BINOP_END },
857 { ".eq.", EQUAL284, BINOP_END },
858 { ".EQ.", EQUAL284, BINOP_END },
859 { ".eqv.", EQUAL284, BINOP_END },
860 { ".NEQV.", NOTEQUAL285, BINOP_END },
861 { ".neqv.", NOTEQUAL285, BINOP_END },
862 { ".EQV.", EQUAL284, BINOP_END },
863 { ".ne.", NOTEQUAL285, BINOP_END },
864 { ".NE.", NOTEQUAL285, BINOP_END },
865 { ".le.", LEQ288, BINOP_END },
866 { ".LE.", LEQ288, BINOP_END },
867 { ".ge.", GEQ289, BINOP_END },
868 { ".GE.", GEQ289, BINOP_END },
869 { ".gt.", GREATERTHAN287, BINOP_END },
870 { ".GT.", GREATERTHAN287, BINOP_END },
871 { ".lt.", LESSTHAN286, BINOP_END },
872 { ".LT.", LESSTHAN286, BINOP_END },
873 { NULL((void*)0), 0, 0 }
874};
875
876struct f77_boolean_val
877{
878 char *name;
879 int value;
880};
881
882static const struct f77_boolean_val boolean_values[] =
883{
884 { ".true.", 1 },
885 { ".TRUE.", 1 },
886 { ".false.", 0 },
887 { ".FALSE.", 0 },
888 { NULL((void*)0), 0 }
889};
890
891static const struct token f77_keywords[] =
892{
893 { "complex_16", COMPLEX_S16_KEYWORD275, BINOP_END },
894 { "complex_32", COMPLEX_S32_KEYWORD276, BINOP_END },
895 { "character", CHARACTER280, BINOP_END },
896 { "integer_2", INT_S2_KEYWORD267, BINOP_END },
897 { "logical_1", LOGICAL_S1_KEYWORD268, BINOP_END },
898 { "logical_2", LOGICAL_S2_KEYWORD269, BINOP_END },
899 { "complex_8", COMPLEX_S8_KEYWORD274, BINOP_END },
900 { "integer", INT_KEYWORD266, BINOP_END },
901 { "logical", LOGICAL_KEYWORD270, BINOP_END },
902 { "real_16", REAL_S16_KEYWORD273, BINOP_END },
903 { "complex", COMPLEX_S8_KEYWORD274, BINOP_END },
904 { "sizeof", SIZEOF264, BINOP_END },
905 { "real_8", REAL_S8_KEYWORD272, BINOP_END },
906 { "real", REAL_KEYWORD271, BINOP_END },
907 { NULL((void*)0), 0, 0 }
908};
909
910/* Implementation of a dynamically expandable buffer for processing input
911 characters acquired through lexptr and building a value to return in
912 yylval. Ripped off from ch-exp.y */
913
914static char *tempbuf; /* Current buffer contents */
915static int tempbufsize; /* Size of allocated buffer */
916static int tempbufindex; /* Current index into buffer */
917
918#define GROWBY_MIN_SIZE64 64 /* Minimum amount to grow buffer by */
919
920#define CHECKBUF(size)do { if (tempbufindex + (size) >= tempbufsize) { growbuf_by_size
(size); } } while (0);
\
921 do { \
922 if (tempbufindex + (size) >= tempbufsize) \
923 { \
924 growbuf_by_size (size); \
925 } \
926 } while (0);
927
928
929/* Grow the static temp buffer if necessary, including allocating the first one
930 on demand. */
931
932static void
933growbuf_by_size (count)
934 int count;
935{
936 int growby;
937
938 growby = max (count, GROWBY_MIN_SIZE)((count) > (64) ? (count) : (64));
939 tempbufsize += growby;
940 if (tempbuf == NULL((void*)0))
941 tempbuf = (char *) xmalloc (tempbufsize);
942 else
943 tempbuf = (char *) xrealloc (tempbuf, tempbufsize);
944}
945
946/* Blatantly ripped off from ch-exp.y. This routine recognizes F77
947 string-literals.
948
949 Recognize a string literal. A string literal is a nonzero sequence
950 of characters enclosed in matching single quotes, except that
951 a single character inside single quotes is a character literal, which
952 we reject as a string literal. To embed the terminator character inside
953 a string, it is simply doubled (I.E. 'this''is''one''string') */
954
955static int
956match_string_literal ()
957{
958 char *tokptr = lexptr;
959
960 for (tempbufindex = 0, tokptr++; *tokptr != '\0'; tokptr++)
961 {
962 CHECKBUF (1)do { if (tempbufindex + (1) >= tempbufsize) { growbuf_by_size
(1); } } while (0);
;
963 if (*tokptr == *lexptr)
964 {
965 if (*(tokptr + 1) == *lexptr)
966 tokptr++;
967 else
968 break;
969 }
970 tempbuf[tempbufindex++] = *tokptr;
971 }
972 if (*tokptr == '\0' /* no terminator */
973 || tempbufindex == 0) /* no string */
974 return 0;
975 else
976 {
977 tempbuf[tempbufindex] = '\0';
978 yylvalf_lval.sval.ptr = tempbuf;
979 yylvalf_lval.sval.length = tempbufindex;
980 lexptr = ++tokptr;
981 return STRING_LITERAL259;
982 }
983}
984
985/* Read one token, getting characters through lexptr. */
986
987static int
988yylexf_lex ()
989{
990 int c;
991 int namelen;
992 unsigned int i,token;
993 char *tokstart;
994
995 retry:
996
997 prev_lexptr = lexptr;
998
999 tokstart = lexptr;
1000
1001 /* First of all, let us make sure we are not dealing with the
1002 special tokens .true. and .false. which evaluate to 1 and 0. */
1003
1004 if (*lexptr == '.')
1005 {
1006 for (i = 0; boolean_values[i].name != NULL((void*)0); i++)
1007 {
1008 if (strncmp (tokstart, boolean_values[i].name,
1009 strlen (boolean_values[i].name)) == 0)
1010 {
1011 lexptr += strlen (boolean_values[i].name);
1012 yylvalf_lval.lval = boolean_values[i].value;
1013 return BOOLEAN_LITERAL260;
1014 }
1015 }
1016 }
1017
1018 /* See if it is a special .foo. operator */
1019
1020 for (i = 0; dot_ops[i].operator != NULL((void*)0); i++)
1021 if (strncmp (tokstart, dot_ops[i].operator, strlen (dot_ops[i].operator)) == 0)
1022 {
1023 lexptr += strlen (dot_ops[i].operator);
1024 yylvalf_lval.opcode = dot_ops[i].opcode;
1025 return dot_ops[i].token;
1026 }
1027
1028 switch (c = *tokstart)
1029 {
1030 case 0:
1031 return 0;
1032
1033 case ' ':
1034 case '\t':
1035 case '\n':
1036 lexptr++;
1037 goto retry;
1038
1039 case '\'':
1040 token = match_string_literal ();
1041 if (token != 0)
1042 return (token);
1043 break;
1044
1045 case '(':
1046 paren_depth++;
1047 lexptr++;
1048 return c;
1049
1050 case ')':
1051 if (paren_depth == 0)
1052 return 0;
1053 paren_depth--;
1054 lexptr++;
1055 return c;
1056
1057 case ',':
1058 if (comma_terminates && paren_depth == 0)
1059 return 0;
1060 lexptr++;
1061 return c;
1062
1063 case '.':
1064 /* Might be a floating point number. */
1065 if (lexptr[1] < '0' || lexptr[1] > '9')
1066 goto symbol; /* Nope, must be a symbol. */
1067 /* FALL THRU into number case. */
1068
1069 case '0':
1070 case '1':
1071 case '2':
1072 case '3':
1073 case '4':
1074 case '5':
1075 case '6':
1076 case '7':
1077 case '8':
1078 case '9':
1079 {
1080 /* It's a number. */
1081 int got_dot = 0, got_e = 0, got_d = 0, toktype;
1082 char *p = tokstart;
1083 int hex = input_radix > 10;
1084
1085 if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
1086 {
1087 p += 2;
1088 hex = 1;
1089 }
1090 else if (c == '0' && (p[1]=='t' || p[1]=='T' || p[1]=='d' || p[1]=='D'))
1091 {
1092 p += 2;
1093 hex = 0;
1094 }
1095
1096 for (;; ++p)
1097 {
1098 if (!hex && !got_e && (*p == 'e' || *p == 'E'))
1099 got_dot = got_e = 1;
1100 else if (!hex && !got_d && (*p == 'd' || *p == 'D'))
1101 got_dot = got_d = 1;
1102 else if (!hex && !got_dot && *p == '.')
1103 got_dot = 1;
1104 else if (((got_e && (p[-1] == 'e' || p[-1] == 'E'))
1105 || (got_d && (p[-1] == 'd' || p[-1] == 'D')))
1106 && (*p == '-' || *p == '+'))
1107 /* This is the sign of the exponent, not the end of the
1108 number. */
1109 continue;
1110 /* We will take any letters or digits. parse_number will
1111 complain if past the radix, or if L or U are not final. */
1112 else if ((*p < '0' || *p > '9')
1113 && ((*p < 'a' || *p > 'z')
1114 && (*p < 'A' || *p > 'Z')))
1115 break;
1116 }
1117 toktype = parse_number (tokstart, p - tokstart, got_dot|got_e|got_d,
1118 &yylvalf_lval);
1119 if (toktype == ERROR265)
1120 {
1121 char *err_copy = (char *) alloca (p - tokstart + 1)__builtin_alloca(p - tokstart + 1);
1122
1123 memcpy (err_copy, tokstart, p - tokstart);
1124 err_copy[p - tokstart] = 0;
1125 error ("Invalid number \"%s\".", err_copy);
1126 }
1127 lexptr = p;
1128 return toktype;
1129 }
1130
1131 case '+':
1132 case '-':
1133 case '*':
1134 case '/':
1135 case '%':
1136 case '|':
1137 case '&':
1138 case '^':
1139 case '~':
1140 case '!':
1141 case '@':
1142 case '<':
1143 case '>':
1144 case '[':
1145 case ']':
1146 case '?':
1147 case ':':
1148 case '=':
1149 case '{':
1150 case '}':
1151 symbol:
1152 lexptr++;
1153 return c;
1154 }
1155
1156 if (!(c == '_' || c == '$'
1157 || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
1158 /* We must have come across a bad character (e.g. ';'). */
1159 error ("Invalid character '%c' in expression.", c);
1160
1161 namelen = 0;
1162 for (c = tokstart[namelen];
1163 (c == '_' || c == '$' || (c >= '0' && c <= '9')
1164 || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
1165 c = tokstart[++namelen]);
1166
1167 /* The token "if" terminates the expression and is NOT
1168 removed from the input stream. */
1169
1170 if (namelen == 2 && tokstart[0] == 'i' && tokstart[1] == 'f')
1171 return 0;
1172
1173 lexptr += namelen;
1174
1175 /* Catch specific keywords. */
1176
1177 for (i = 0; f77_keywords[i].operator != NULL((void*)0); i++)
1178 if (strncmp (tokstart, f77_keywords[i].operator,
1179 strlen(f77_keywords[i].operator)) == 0)
1180 {
1181 /* lexptr += strlen(f77_keywords[i].operator); */
1182 yylvalf_lval.opcode = f77_keywords[i].opcode;
1183 return f77_keywords[i].token;
1184 }
1185
1186 yylvalf_lval.sval.ptr = tokstart;
1187 yylvalf_lval.sval.length = namelen;
1188
1189 if (*tokstart == '$')
1190 {
1191 write_dollar_variable (yylvalf_lval.sval);
1192 return VARIABLE281;
1193 }
1194
1195 /* Use token-type TYPENAME for symbols that happen to be defined
1196 currently as names of types; NAME for other symbols.
1197 The caller is not constrained to care about the distinction. */
1198 {
1199 char *tmp = copy_name (yylvalf_lval.sval);
1200 struct symbol *sym;
1201 int is_a_field_of_this = 0;
1202 int hextype;
1203
1204 sym = lookup_symbol (tmp, expression_context_block,
1205 VAR_DOMAIN,
1206 current_language->la_language == language_cplus
1207 ? &is_a_field_of_this : NULL((void*)0),
1208 NULL((void*)0));
1209 if (sym && SYMBOL_CLASS (sym)(sym)->aclass == LOC_TYPEDEF)
1210 {
1211 yylvalf_lval.tsym.type = SYMBOL_TYPE (sym)(sym)->type;
1212 return TYPENAME262;
1213 }
1214 yylvalf_lval.tsym.type
1215 = language_lookup_primitive_type_by_name (current_language,
1216 current_gdbarch, tmp);
1217 if (yylvalf_lval.tsym.type != NULL((void*)0))
1218 return TYPENAME262;
1219
1220 /* Input names that aren't symbols but ARE valid hex numbers,
1221 when the input radix permits them, can be names or numbers
1222 depending on the parse. Note we support radixes > 16 here. */
1223 if (!sym
1224 && ((tokstart[0] >= 'a' && tokstart[0] < 'a' + input_radix - 10)
1225 || (tokstart[0] >= 'A' && tokstart[0] < 'A' + input_radix - 10)))
1226 {
1227 YYSTYPE newlval; /* Its value is ignored. */
1228 hextype = parse_number (tokstart, namelen, 0, &newlval);
1229 if (hextype == INT257)
1230 {
1231 yylvalf_lval.ssym.sym = sym;
1232 yylvalf_lval.ssym.is_a_field_of_this = is_a_field_of_this;
1233 return NAME_OR_INT263;
1234 }
1235 }
1236
1237 /* Any other kind of symbol */
1238 yylvalf_lval.ssym.sym = sym;
1239 yylvalf_lval.ssym.is_a_field_of_this = is_a_field_of_this;
1240 return NAME261;
1241 }
1242}
1243
1244void
1245yyerrorf_error (msg)
1246 char *msg;
1247{
1248 if (prev_lexptr)
1249 lexptr = prev_lexptr;
1250
1251 error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
1252}
1253/* allocate initial stack or double stack size, up to YYMAXDEPTH */
1254static int yygrowstack(void)
1255{
1256 unsigned int newsize;
1257 long sslen;
1258 short *newss;
1259 YYSTYPE *newvs;
1260
1261 if ((newsize = yystacksize) == 0)
1262 newsize = YYINITSTACKSIZE200;
1263 else if (newsize >= YYMAXDEPTH10000)
1264 return -1;
1265 else if ((newsize *= 2) > YYMAXDEPTH10000)
1266 newsize = YYMAXDEPTH10000;
1267 sslen = yyssp - yyss;
1268#ifdef SIZE_MAX
1269#define YY_SIZE_MAX0xffffffffU SIZE_MAX
1270#else
1271#define YY_SIZE_MAX0xffffffffU 0xffffffffU
1272#endif
1273 if (newsize && YY_SIZE_MAX0xffffffffU / newsize < sizeof *newss)
1274 goto bail;
1275 newss = (short *)xrealloc(yyss, newsize * sizeof *newss);
1276 if (newss == NULL((void*)0))
1277 goto bail;
1278 yyss = newss;
1279 yyssp = newss + sslen;
1280 if (newsize && YY_SIZE_MAX0xffffffffU / newsize < sizeof *newvs)
1281 goto bail;
1282 newvs = (YYSTYPE *)xrealloc(yyvs, newsize * sizeof *newvs);
1283 if (newvs == NULL((void*)0))
1284 goto bail;
1285 yyvs = newvs;
1286 yyvsp = newvs + sslen;
1287 yystacksize = newsize;
1288 yysslim = yyss + newsize - 1;
1289 return 0;
1290bail:
1291 if (yyss)
1292 free(yyss);
1293 if (yyvs)
1294 free(yyvs);
1295 yyss = yyssp = NULL((void*)0);
1296 yyvs = yyvsp = NULL((void*)0);
1297 yystacksize = 0;
1298 return -1;
1299}
1300
1301#define YYABORTgoto yyabort goto yyabort
1302#define YYREJECTgoto yyabort goto yyabort
1303#define YYACCEPTgoto yyaccept goto yyaccept
1304#define YYERRORgoto yyerrlab goto yyerrlab
1305int
1306yyparsef_parse(void)
1307{
1308 int yym, yyn, yystatef_state;
1309#if YYDEBUG1
1310 const char *yysf_s;
1311
1312 if ((yysf_s = getenv("YYDEBUG")))
1
Assuming 'f_s' is null
2
Taking false branch
1313 {
1314 yyn = *yysf_s;
1315 if (yyn >= '0' && yyn <= '9')
1316 yydebugf_debug = yyn - '0';
1317 }
1318#endif /* YYDEBUG */
1319
1320 yynerrsf_nerrs = 0;
1321 yyerrflagf_errflag = 0;
1322 yycharf_char = (-1);
1323
1324 if (yyss == NULL((void*)0) && yygrowstack()) goto yyoverflow;
3
Assuming 'yyss' is not equal to NULL
1325 yyssp = yyss;
1326 yyvsp = yyvs;
1327 *yyssp = yystatef_state = 0;
1328
1329yyloop:
1330 if ((yyn = yydefredf_yydefred[yystatef_state]) != 0) goto yyreduce;
4
Taking false branch
20
Assuming the condition is true
21
Taking true branch
22
Control jumps to line 1433
1331 if (yycharf_char < 0)
5
Taking true branch
1332 {
1333 if ((yycharf_char = yylexf_lex()) < 0) yycharf_char = 0;
6
Assuming the condition is false
7
Taking false branch
1334#if YYDEBUG1
1335 if (yydebugf_debug)
8
Assuming 'f_debug' is 0
9
Taking false branch
1336 {
1337 yysf_s = 0;
1338 if (yycharf_char <= YYMAXTOKEN292) yysf_s = yynamef_name[yycharf_char];
1339 if (!yysf_s) yysf_s = "illegal-symbol";
1340 printf("%sdebug: state %d, reading %d (%s)\n",
1341 YYPREFIX"yy", yystatef_state, yycharf_char, yysf_s);
1342 }
1343#endif
1344 }
1345 if ((yyn = yysindexf_yysindex[yystatef_state]) && (yyn += yycharf_char) >= 0 &&
10
Assuming 'yyn' is not equal to 0
11
Assuming the condition is true
14
Taking true branch
1346 yyn <= YYTABLESIZE1573 && yycheckf_yycheck[yyn] == yycharf_char)
12
Assuming 'yyn' is <= YYTABLESIZE
13
Assuming the condition is true
1347 {
1348#if YYDEBUG1
1349 if (yydebugf_debug)
15
Taking false branch
1350 printf("%sdebug: state %d, shifting to state %d\n",
1351 YYPREFIX"yy", yystatef_state, yytablef_yytable[yyn]);
1352#endif
1353 if (yyssp >= yysslim && yygrowstack())
16
Assuming 'yyssp' is < 'yysslim'
1354 {
1355 goto yyoverflow;
1356 }
1357 *++yyssp = yystatef_state = yytablef_yytable[yyn];
1358 *++yyvsp = yylvalf_lval;
1359 yycharf_char = (-1);
1360 if (yyerrflagf_errflag > 0) --yyerrflagf_errflag;
17
Assuming 'f_errflag' is <= 0
18
Taking false branch
1361 goto yyloop;
19
Control jumps to line 1330
1362 }
1363 if ((yyn = yyrindexf_yyrindex[yystatef_state]) && (yyn += yycharf_char) >= 0 &&
1364 yyn <= YYTABLESIZE1573 && yycheckf_yycheck[yyn] == yycharf_char)
1365 {
1366 yyn = yytablef_yytable[yyn];
1367 goto yyreduce;
1368 }
1369 if (yyerrflagf_errflag) goto yyinrecovery;
1370#if defined(__GNUC__4)
1371 goto yynewerror;
1372#endif
1373yynewerror:
1374 yyerrorf_error("syntax error");
1375#if defined(__GNUC__4)
1376 goto yyerrlab;
1377#endif
1378yyerrlab:
1379 ++yynerrsf_nerrs;
1380yyinrecovery:
1381 if (yyerrflagf_errflag < 3)
1382 {
1383 yyerrflagf_errflag = 3;
1384 for (;;)
1385 {
1386 if ((yyn = yysindexf_yysindex[*yyssp]) && (yyn += YYERRCODE256) >= 0 &&
1387 yyn <= YYTABLESIZE1573 && yycheckf_yycheck[yyn] == YYERRCODE256)
1388 {
1389#if YYDEBUG1
1390 if (yydebugf_debug)
1391 printf("%sdebug: state %d, error recovery shifting\
1392 to state %d\n", YYPREFIX"yy", *yyssp, yytablef_yytable[yyn]);
1393#endif
1394 if (yyssp >= yysslim && yygrowstack())
1395 {
1396 goto yyoverflow;
1397 }
1398 *++yyssp = yystatef_state = yytablef_yytable[yyn];
1399 *++yyvsp = yylvalf_lval;
1400 goto yyloop;
1401 }
1402 else
1403 {
1404#if YYDEBUG1
1405 if (yydebugf_debug)
1406 printf("%sdebug: error recovery discarding state %d\n",
1407 YYPREFIX"yy", *yyssp);
1408#endif
1409 if (yyssp <= yyss) goto yyabort;
1410 --yyssp;
1411 --yyvsp;
1412 }
1413 }
1414 }
1415 else
1416 {
1417 if (yycharf_char == 0) goto yyabort;
1418#if YYDEBUG1
1419 if (yydebugf_debug)
1420 {
1421 yysf_s = 0;
1422 if (yycharf_char <= YYMAXTOKEN292) yysf_s = yynamef_name[yycharf_char];
1423 if (!yysf_s) yysf_s = "illegal-symbol";
1424 printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
1425 YYPREFIX"yy", yystatef_state, yycharf_char, yysf_s);
1426 }
1427#endif
1428 yycharf_char = (-1);
1429 goto yyloop;
1430 }
1431yyreduce:
1432#if YYDEBUG1
1433 if (yydebugf_debug)
23
Taking false branch
1434 printf("%sdebug: state %d, reducing by rule %d (%s)\n",
1435 YYPREFIX"yy", yystatef_state, yyn, yyrulef_rule[yyn]);
1436#endif
1437 yym = yylenf_yylen[yyn];
1438 if (yym)
24
Assuming 'yym' is not equal to 0
25
Taking true branch
1439 yyvalf_val = yyvsp[1-yym];
1440 else
1441 memset(&yyvalf_val, 0, sizeof yyvalf_val);
1442 switch (yyn)
26
Control jumps to 'case 43:' at line 1611
1443 {
1444case 3:
1445#line 233 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1446{ write_exp_elt_opcode(OP_TYPE);
1447 write_exp_elt_type(yyvsp[0].tval);
1448 write_exp_elt_opcode(OP_TYPE); }
1449break;
1450case 4:
1451#line 239 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1452{ }
1453break;
1454case 5:
1455#line 244 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1456{ write_exp_elt_opcode (UNOP_IND); }
1457break;
1458case 6:
1459#line 248 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1460{ write_exp_elt_opcode (UNOP_ADDR); }
1461break;
1462case 7:
1463#line 252 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1464{ write_exp_elt_opcode (UNOP_NEG); }
1465break;
1466case 8:
1467#line 256 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1468{ write_exp_elt_opcode (UNOP_LOGICAL_NOT); }
1469break;
1470case 9:
1471#line 260 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1472{ write_exp_elt_opcode (UNOP_COMPLEMENT); }
1473break;
1474case 10:
1475#line 264 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1476{ write_exp_elt_opcode (UNOP_SIZEOF); }
1477break;
1478case 11:
1479#line 273 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1480{ start_arglist (); }
1481break;
1482case 12:
1483#line 275 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1484{ write_exp_elt_opcode (OP_F77_UNDETERMINED_ARGLIST);
1485 write_exp_elt_longcst ((LONGESTlong) end_arglist ());
1486 write_exp_elt_opcode (OP_F77_UNDETERMINED_ARGLIST); }
1487break;
1488case 14:
1489#line 284 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1490{ arglist_len = 1; }
1491break;
1492case 15:
1493#line 288 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1494{ arglist_len = 2;}
1495break;
1496case 16:
1497#line 292 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1498{ arglist_len++; }
1499break;
1500case 17:
1501#line 296 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1502{ }
1503break;
1504case 18:
1505#line 301 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1506{ }
1507break;
1508case 19:
1509#line 305 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1510{ write_exp_elt_opcode(OP_COMPLEX); }
1511break;
1512case 20:
1513#line 309 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1514{ write_exp_elt_opcode (UNOP_CAST);
1515 write_exp_elt_type (yyvsp[-2].tval);
1516 write_exp_elt_opcode (UNOP_CAST); }
1517break;
1518case 21:
1519#line 317 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1520{ write_exp_elt_opcode (BINOP_REPEAT); }
1521break;
1522case 22:
1523#line 321 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1524{ write_exp_elt_opcode (BINOP_MUL); }
1525break;
1526case 23:
1527#line 325 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1528{ write_exp_elt_opcode (BINOP_DIV); }
1529break;
1530case 24:
1531#line 329 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1532{ write_exp_elt_opcode (BINOP_REM); }
1533break;
1534case 25:
1535#line 333 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1536{ write_exp_elt_opcode (BINOP_ADD); }
1537break;
1538case 26:
1539#line 337 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1540{ write_exp_elt_opcode (BINOP_SUB); }
1541break;
1542case 27:
1543#line 341 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1544{ write_exp_elt_opcode (BINOP_LSH); }
1545break;
1546case 28:
1547#line 345 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1548{ write_exp_elt_opcode (BINOP_RSH); }
1549break;
1550case 29:
1551#line 349 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1552{ write_exp_elt_opcode (BINOP_EQUAL); }
1553break;
1554case 30:
1555#line 353 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1556{ write_exp_elt_opcode (BINOP_NOTEQUAL); }
1557break;
1558case 31:
1559#line 357 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1560{ write_exp_elt_opcode (BINOP_LEQ); }
1561break;
1562case 32:
1563#line 361 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1564{ write_exp_elt_opcode (BINOP_GEQ); }
1565break;
1566case 33:
1567#line 365 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1568{ write_exp_elt_opcode (BINOP_LESS); }
1569break;
1570case 34:
1571#line 369 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1572{ write_exp_elt_opcode (BINOP_GTR); }
1573break;
1574case 35:
1575#line 373 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1576{ write_exp_elt_opcode (BINOP_BITWISE_AND); }
1577break;
1578case 36:
1579#line 377 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1580{ write_exp_elt_opcode (BINOP_BITWISE_XOR); }
1581break;
1582case 37:
1583#line 381 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1584{ write_exp_elt_opcode (BINOP_BITWISE_IOR); }
1585break;
1586case 38:
1587#line 385 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1588{ write_exp_elt_opcode (BINOP_LOGICAL_AND); }
1589break;
1590case 39:
1591#line 390 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1592{ write_exp_elt_opcode (BINOP_LOGICAL_OR); }
1593break;
1594case 40:
1595#line 394 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1596{ write_exp_elt_opcode (BINOP_ASSIGN); }
1597break;
1598case 41:
1599#line 398 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1600{ write_exp_elt_opcode (BINOP_ASSIGN_MODIFY);
1601 write_exp_elt_opcode (yyvsp[-1].opcode);
1602 write_exp_elt_opcode (BINOP_ASSIGN_MODIFY); }
1603break;
1604case 42:
1605#line 404 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1606{ write_exp_elt_opcode (OP_LONG);
1607 write_exp_elt_type (yyvsp[0].typed_val.type);
1608 write_exp_elt_longcst ((LONGESTlong)(yyvsp[0].typed_val.val));
1609 write_exp_elt_opcode (OP_LONG); }
1610break;
1611case 43:
1612#line 411 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1613{ YYSTYPE val;
1614 parse_number (yyvsp[0].ssym.stoken.ptr, yyvsp[0].ssym.stoken.length, 0, &val);
27
Calling 'parse_number'
37
Returning from 'parse_number'
1615 write_exp_elt_opcode (OP_LONG);
1616 write_exp_elt_type (val.typed_val.type);
38
1st function call argument is an uninitialized value
1617 write_exp_elt_longcst ((LONGESTlong)val.typed_val.val);
1618 write_exp_elt_opcode (OP_LONG); }
1619break;
1620case 44:
1621#line 420 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1622{ write_exp_elt_opcode (OP_DOUBLE);
1623 write_exp_elt_type (builtin_type_f_real_s8);
1624 write_exp_elt_dblcst (yyvsp[0].dval);
1625 write_exp_elt_opcode (OP_DOUBLE); }
1626break;
1627case 47:
1628#line 433 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1629{ write_exp_elt_opcode (OP_LONG);
1630 write_exp_elt_type (builtin_type_f_integer);
1631 CHECK_TYPEDEF (yyvsp[-1].tval)(yyvsp[-1].tval) = check_typedef (yyvsp[-1].tval);
1632 write_exp_elt_longcst ((LONGESTlong) TYPE_LENGTH (yyvsp[-1].tval)(yyvsp[-1].tval)->length);
1633 write_exp_elt_opcode (OP_LONG); }
1634break;
1635case 48:
1636#line 441 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1637{ write_exp_elt_opcode (OP_BOOL);
1638 write_exp_elt_longcst ((LONGESTlong) yyvsp[0].lval);
1639 write_exp_elt_opcode (OP_BOOL);
1640 }
1641break;
1642case 49:
1643#line 448 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1644{
1645 write_exp_elt_opcode (OP_STRING);
1646 write_exp_string (yyvsp[0].sval);
1647 write_exp_elt_opcode (OP_STRING);
1648 }
1649break;
1650case 50:
1651#line 456 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1652{ struct symbol *sym = yyvsp[0].ssym.sym;
1653
1654 if (sym)
1655 {
1656 if (symbol_read_needs_frame (sym))
1657 {
1658 if (innermost_block == 0 ||
1659 contained_in (block_found,
1660 innermost_block))
1661 innermost_block = block_found;
1662 }
1663 write_exp_elt_opcode (OP_VAR_VALUE);
1664 /* We want to use the selected frame, not
1665 another more inner frame which happens to
1666 be in the same block. */
1667 write_exp_elt_block (NULL((void*)0));
1668 write_exp_elt_sym (sym);
1669 write_exp_elt_opcode (OP_VAR_VALUE);
1670 break;
1671 }
1672 else
1673 {
1674 struct minimal_symbol *msymbol;
1675 char *arg = copy_name (yyvsp[0].ssym.stoken);
1676
1677 msymbol =
1678 lookup_minimal_symbol (arg, NULL((void*)0), NULL((void*)0));
1679 if (msymbol != NULL((void*)0))
1680 {
1681 write_exp_msymbol (msymbol,
1682 lookup_function_type (builtin_type_int),
1683 builtin_type_int);
1684 }
1685 else if (!have_full_symbols () && !have_partial_symbols ())
1686 error ("No symbol table is loaded. Use the \"file\" command.");
1687 else
1688 error ("No symbol \"%s\" in current context.",
1689 copy_name (yyvsp[0].ssym.stoken));
1690 }
1691 }
1692break;
1693case 53:
1694#line 504 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1695{
1696 /* This is where the interesting stuff happens. */
1697 int done = 0;
1698 int array_size;
1699 struct type *follow_type = yyvsp[-1].tval;
1700 struct type *range_type;
1701
1702 while (!done)
1703 switch (pop_type ())
1704 {
1705 case tp_end:
1706 done = 1;
1707 break;
1708 case tp_pointer:
1709 follow_type = lookup_pointer_type (follow_type);
1710 break;
1711 case tp_reference:
1712 follow_type = lookup_reference_type (follow_type);
1713 break;
1714 case tp_array:
1715 array_size = pop_type_int ();
1716 if (array_size != -1)
1717 {
1718 range_type =
1719 create_range_type ((struct type *) NULL((void*)0),
1720 builtin_type_f_integer, 0,
1721 array_size - 1);
1722 follow_type =
1723 create_array_type ((struct type *) NULL((void*)0),
1724 follow_type, range_type);
1725 }
1726 else
1727 follow_type = lookup_pointer_type (follow_type);
1728 break;
1729 case tp_function:
1730 follow_type = lookup_function_type (follow_type);
1731 break;
1732 }
1733 yyvalf_val.tval = follow_type;
1734 }
1735break;
1736case 54:
1737#line 547 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1738{ push_type (tp_pointer); yyvalf_val.voidval = 0; }
1739break;
1740case 55:
1741#line 549 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1742{ push_type (tp_pointer); yyvalf_val.voidval = yyvsp[0].voidval; }
1743break;
1744case 56:
1745#line 551 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1746{ push_type (tp_reference); yyvalf_val.voidval = 0; }
1747break;
1748case 57:
1749#line 553 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1750{ push_type (tp_reference); yyvalf_val.voidval = yyvsp[0].voidval; }
1751break;
1752case 59:
1753#line 558 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1754{ yyvalf_val.voidval = yyvsp[-1].voidval; }
1755break;
1756case 60:
1757#line 560 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1758{ push_type (tp_function); }
1759break;
1760case 61:
1761#line 562 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1762{ push_type (tp_function); }
1763break;
1764case 62:
1765#line 566 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1766{ yyvalf_val.voidval = 0; }
1767break;
1768case 63:
1769#line 568 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1770{ free (yyvsp[-1].tvec); yyvalf_val.voidval = 0; }
1771break;
1772case 64:
1773#line 573 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1774{ yyvalf_val.tval = yyvsp[0].tsym.type; }
1775break;
1776case 65:
1777#line 575 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1778{ yyvalf_val.tval = builtin_type_f_integer; }
1779break;
1780case 66:
1781#line 577 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1782{ yyvalf_val.tval = builtin_type_f_integer_s2; }
1783break;
1784case 67:
1785#line 579 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1786{ yyvalf_val.tval = builtin_type_f_character; }
1787break;
1788case 68:
1789#line 581 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1790{ yyvalf_val.tval = builtin_type_f_logical;}
1791break;
1792case 69:
1793#line 583 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1794{ yyvalf_val.tval = builtin_type_f_logical_s2;}
1795break;
1796case 70:
1797#line 585 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1798{ yyvalf_val.tval = builtin_type_f_logical_s1;}
1799break;
1800case 71:
1801#line 587 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1802{ yyvalf_val.tval = builtin_type_f_real;}
1803break;
1804case 72:
1805#line 589 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1806{ yyvalf_val.tval = builtin_type_f_real_s8;}
1807break;
1808case 73:
1809#line 591 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1810{ yyvalf_val.tval = builtin_type_f_real_s16;}
1811break;
1812case 74:
1813#line 593 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1814{ yyvalf_val.tval = builtin_type_f_complex_s8;}
1815break;
1816case 75:
1817#line 595 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1818{ yyvalf_val.tval = builtin_type_f_complex_s16;}
1819break;
1820case 76:
1821#line 597 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1822{ yyvalf_val.tval = builtin_type_f_complex_s32;}
1823break;
1824case 78:
1825#line 605 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1826{ yyvalf_val.tvec = (struct type **) xmalloc (sizeof (struct type *) * 2);
1827 yyvalf_val.ivec[0] = 1; /* Number of types in vector */
1828 yyvalf_val.tvec[1] = yyvsp[0].tval;
1829 }
1830break;
1831case 79:
1832#line 610 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1833{ int len = sizeof (struct type *) * (++(yyvsp[-2].ivec[0]) + 1);
1834 yyvalf_val.tvec = (struct type **) xrealloc ((char *) yyvsp[-2].tvec, len);
1835 yyvalf_val.tvec[yyvalf_val.ivec[0]] = yyvsp[0].tval;
1836 }
1837break;
1838case 80:
1839#line 617 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1840{ yyvalf_val.sval = yyvsp[0].ssym.stoken; }
1841break;
1842case 81:
1843#line 619 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1844{ yyvalf_val.sval = yyvsp[0].tsym.stoken; }
1845break;
1846case 82:
1847#line 621 "/usr/src/gnu/usr.bin/binutils/gdb/f-exp.y"
1848{ yyvalf_val.sval = yyvsp[0].ssym.stoken; }
1849break;
1850 }
1851 yyssp -= yym;
1852 yystatef_state = *yyssp;
1853 yyvsp -= yym;
1854 yym = yylhsf_yylhs[yyn];
1855 if (yystatef_state == 0 && yym == 0)
1856 {
1857#if YYDEBUG1
1858 if (yydebugf_debug)
1859 printf("%sdebug: after reduction, shifting from state 0 to\
1860 state %d\n", YYPREFIX"yy", YYFINAL28);
1861#endif
1862 yystatef_state = YYFINAL28;
1863 *++yyssp = YYFINAL28;
1864 *++yyvsp = yyvalf_val;
1865 if (yycharf_char < 0)
1866 {
1867 if ((yycharf_char = yylexf_lex()) < 0) yycharf_char = 0;
1868#if YYDEBUG1
1869 if (yydebugf_debug)
1870 {
1871 yysf_s = 0;
1872 if (yycharf_char <= YYMAXTOKEN292) yysf_s = yynamef_name[yycharf_char];
1873 if (!yysf_s) yysf_s = "illegal-symbol";
1874 printf("%sdebug: state %d, reading %d (%s)\n",
1875 YYPREFIX"yy", YYFINAL28, yycharf_char, yysf_s);
1876 }
1877#endif
1878 }
1879 if (yycharf_char == 0) goto yyaccept;
1880 goto yyloop;
1881 }
1882 if ((yyn = yygindexf_yygindex[yym]) && (yyn += yystatef_state) >= 0 &&
1883 yyn <= YYTABLESIZE1573 && yycheckf_yycheck[yyn] == yystatef_state)
1884 yystatef_state = yytablef_yytable[yyn];
1885 else
1886 yystatef_state = yydgotof_yydgoto[yym];
1887#if YYDEBUG1
1888 if (yydebugf_debug)
1889 printf("%sdebug: after reduction, shifting from state %d \
1890to state %d\n", YYPREFIX"yy", *yyssp, yystatef_state);
1891#endif
1892 if (yyssp >= yysslim && yygrowstack())
1893 {
1894 goto yyoverflow;
1895 }
1896 *++yyssp = yystatef_state;
1897 *++yyvsp = yyvalf_val;
1898 goto yyloop;
1899yyoverflow:
1900 yyerrorf_error("yacc stack overflow");
1901yyabort:
1902 if (yyss)
1903 free(yyss);
1904 if (yyvs)
1905 free(yyvs);
1906 yyss = yyssp = NULL((void*)0);
1907 yyvs = yyvsp = NULL((void*)0);
1908 yystacksize = 0;
1909 return (1);
1910yyaccept:
1911 if (yyss)
1912 free(yyss);
1913 if (yyvs)
1914 free(yyvs);
1915 yyss = yyssp = NULL((void*)0);
1916 yyvs = yyvsp = NULL((void*)0);
1917 yystacksize = 0;
1918 return (0);
1919}