re PR debug/66691 (ICE on valid code at -O3 with -g enabled in simplify_subreg, at...
[gcc.git] / gcc / cp / lex.c
1 /* Separate lexical analyzer for GNU C++.
2 Copyright (C) 1987-2015 Free Software Foundation, Inc.
3 Hacked by Michael Tiemann (tiemann@cygnus.com)
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
11
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
20
21
22 /* This file is the lexical analyzer for GNU C++. */
23
24 #include "config.h"
25 #include "system.h"
26 #include "coretypes.h"
27 #include "tm.h"
28 #include "alias.h"
29 #include "symtab.h"
30 #include "tree.h"
31 #include "stringpool.h"
32 #include "cp-tree.h"
33 #include "cpplib.h"
34 #include "flags.h"
35 #include "c-family/c-pragma.h"
36 #include "c-family/c-objc.h"
37 #include "tm_p.h"
38 #include "timevar.h"
39
40 static int interface_strcmp (const char *);
41 static void init_cp_pragma (void);
42
43 static tree parse_strconst_pragma (const char *, int);
44 static void handle_pragma_vtable (cpp_reader *);
45 static void handle_pragma_unit (cpp_reader *);
46 static void handle_pragma_interface (cpp_reader *);
47 static void handle_pragma_implementation (cpp_reader *);
48 static void handle_pragma_java_exceptions (cpp_reader *);
49
50 static void init_operators (void);
51 static void copy_lang_type (tree);
52
53 /* A constraint that can be tested at compile time. */
54 #define CONSTRAINT(name, expr) extern int constraint_##name [(expr) ? 1 : -1]
55
56 /* Functions and data structures for #pragma interface.
57
58 `#pragma implementation' means that the main file being compiled
59 is considered to implement (provide) the classes that appear in
60 its main body. I.e., if this is file "foo.cc", and class `bar'
61 is defined in "foo.cc", then we say that "foo.cc implements bar".
62
63 All main input files "implement" themselves automagically.
64
65 `#pragma interface' means that unless this file (of the form "foo.h"
66 is not presently being included by file "foo.cc", the
67 CLASSTYPE_INTERFACE_ONLY bit gets set. The effect is that none
68 of the vtables nor any of the inline functions defined in foo.h
69 will ever be output.
70
71 There are cases when we want to link files such as "defs.h" and
72 "main.cc". In this case, we give "defs.h" a `#pragma interface',
73 and "main.cc" has `#pragma implementation "defs.h"'. */
74
75 struct impl_files
76 {
77 const char *filename;
78 struct impl_files *next;
79 };
80
81 static struct impl_files *impl_file_chain;
82
83 /* True if we saw "#pragma GCC java_exceptions". */
84 bool pragma_java_exceptions;
85 \f
86 void
87 cxx_finish (void)
88 {
89 c_common_finish ();
90 }
91
92 /* A mapping from tree codes to operator name information. */
93 operator_name_info_t operator_name_info[(int) MAX_TREE_CODES];
94 /* Similar, but for assignment operators. */
95 operator_name_info_t assignment_operator_name_info[(int) MAX_TREE_CODES];
96
97 /* Initialize data structures that keep track of operator names. */
98
99 #define DEF_OPERATOR(NAME, C, M, AR, AP) \
100 CONSTRAINT (C, sizeof "operator " + sizeof NAME <= 256);
101 #include "operators.def"
102 #undef DEF_OPERATOR
103
104 static void
105 init_operators (void)
106 {
107 tree identifier;
108 char buffer[256];
109 struct operator_name_info_t *oni;
110
111 #define DEF_OPERATOR(NAME, CODE, MANGLING, ARITY, ASSN_P) \
112 sprintf (buffer, ISALPHA (NAME[0]) ? "operator %s" : "operator%s", NAME); \
113 identifier = get_identifier (buffer); \
114 IDENTIFIER_OPNAME_P (identifier) = 1; \
115 \
116 oni = (ASSN_P \
117 ? &assignment_operator_name_info[(int) CODE] \
118 : &operator_name_info[(int) CODE]); \
119 oni->identifier = identifier; \
120 oni->name = NAME; \
121 oni->mangled_name = MANGLING; \
122 oni->arity = ARITY;
123
124 #include "operators.def"
125 #undef DEF_OPERATOR
126
127 operator_name_info[(int) ERROR_MARK].identifier
128 = get_identifier ("<invalid operator>");
129
130 /* Handle some special cases. These operators are not defined in
131 the language, but can be produced internally. We may need them
132 for error-reporting. (Eventually, we should ensure that this
133 does not happen. Error messages involving these operators will
134 be confusing to users.) */
135
136 operator_name_info [(int) INIT_EXPR].name
137 = operator_name_info [(int) MODIFY_EXPR].name;
138 operator_name_info [(int) EXACT_DIV_EXPR].name = "(ceiling /)";
139 operator_name_info [(int) CEIL_DIV_EXPR].name = "(ceiling /)";
140 operator_name_info [(int) FLOOR_DIV_EXPR].name = "(floor /)";
141 operator_name_info [(int) ROUND_DIV_EXPR].name = "(round /)";
142 operator_name_info [(int) CEIL_MOD_EXPR].name = "(ceiling %)";
143 operator_name_info [(int) FLOOR_MOD_EXPR].name = "(floor %)";
144 operator_name_info [(int) ROUND_MOD_EXPR].name = "(round %)";
145 operator_name_info [(int) ABS_EXPR].name = "abs";
146 operator_name_info [(int) TRUTH_AND_EXPR].name = "strict &&";
147 operator_name_info [(int) TRUTH_OR_EXPR].name = "strict ||";
148 operator_name_info [(int) RANGE_EXPR].name = "...";
149 operator_name_info [(int) UNARY_PLUS_EXPR].name = "+";
150
151 assignment_operator_name_info [(int) EXACT_DIV_EXPR].name
152 = "(exact /=)";
153 assignment_operator_name_info [(int) CEIL_DIV_EXPR].name
154 = "(ceiling /=)";
155 assignment_operator_name_info [(int) FLOOR_DIV_EXPR].name
156 = "(floor /=)";
157 assignment_operator_name_info [(int) ROUND_DIV_EXPR].name
158 = "(round /=)";
159 assignment_operator_name_info [(int) CEIL_MOD_EXPR].name
160 = "(ceiling %=)";
161 assignment_operator_name_info [(int) FLOOR_MOD_EXPR].name
162 = "(floor %=)";
163 assignment_operator_name_info [(int) ROUND_MOD_EXPR].name
164 = "(round %=)";
165 }
166
167 /* Initialize the reserved words. */
168
169 void
170 init_reswords (void)
171 {
172 unsigned int i;
173 tree id;
174 int mask = 0;
175
176 if (cxx_dialect < cxx11)
177 mask |= D_CXX0X;
178 if (flag_no_asm)
179 mask |= D_ASM | D_EXT;
180 if (flag_no_gnu_keywords)
181 mask |= D_EXT;
182
183 /* The Objective-C keywords are all context-dependent. */
184 mask |= D_OBJC;
185
186 ridpointers = ggc_cleared_vec_alloc<tree> ((int) RID_MAX);
187 for (i = 0; i < num_c_common_reswords; i++)
188 {
189 if (c_common_reswords[i].disable & D_CONLY)
190 continue;
191 id = get_identifier (c_common_reswords[i].word);
192 C_SET_RID_CODE (id, c_common_reswords[i].rid);
193 ridpointers [(int) c_common_reswords[i].rid] = id;
194 if (! (c_common_reswords[i].disable & mask))
195 C_IS_RESERVED_WORD (id) = 1;
196 }
197
198 for (i = 0; i < NUM_INT_N_ENTS; i++)
199 {
200 char name[50];
201 sprintf (name, "__int%d", int_n_data[i].bitsize);
202 id = get_identifier (name);
203 C_SET_RID_CODE (id, RID_FIRST_INT_N + i);
204 C_IS_RESERVED_WORD (id) = 1;
205 }
206 }
207
208 static void
209 init_cp_pragma (void)
210 {
211 c_register_pragma (0, "vtable", handle_pragma_vtable);
212 c_register_pragma (0, "unit", handle_pragma_unit);
213 c_register_pragma (0, "interface", handle_pragma_interface);
214 c_register_pragma (0, "implementation", handle_pragma_implementation);
215 c_register_pragma ("GCC", "interface", handle_pragma_interface);
216 c_register_pragma ("GCC", "implementation", handle_pragma_implementation);
217 c_register_pragma ("GCC", "java_exceptions", handle_pragma_java_exceptions);
218 }
219 \f
220 /* TRUE if a code represents a statement. */
221
222 bool statement_code_p[MAX_TREE_CODES];
223
224 /* Initialize the C++ front end. This function is very sensitive to
225 the exact order that things are done here. It would be nice if the
226 initialization done by this routine were moved to its subroutines,
227 and the ordering dependencies clarified and reduced. */
228 bool
229 cxx_init (void)
230 {
231 location_t saved_loc;
232 unsigned int i;
233 static const enum tree_code stmt_codes[] = {
234 CTOR_INITIALIZER, TRY_BLOCK, HANDLER,
235 EH_SPEC_BLOCK, USING_STMT, TAG_DEFN,
236 IF_STMT, CLEANUP_STMT, FOR_STMT,
237 RANGE_FOR_STMT, WHILE_STMT, DO_STMT,
238 BREAK_STMT, CONTINUE_STMT, SWITCH_STMT,
239 EXPR_STMT
240 };
241
242 memset (&statement_code_p, 0, sizeof (statement_code_p));
243 for (i = 0; i < ARRAY_SIZE (stmt_codes); i++)
244 statement_code_p[stmt_codes[i]] = true;
245
246 saved_loc = input_location;
247 input_location = BUILTINS_LOCATION;
248
249 init_reswords ();
250 init_tree ();
251 init_cp_semantics ();
252 init_operators ();
253 init_method ();
254
255 current_function_decl = NULL;
256
257 class_type_node = ridpointers[(int) RID_CLASS];
258
259 cxx_init_decl_processing ();
260
261 if (c_common_init () == false)
262 {
263 input_location = saved_loc;
264 return false;
265 }
266
267 init_cp_pragma ();
268
269 init_repo ();
270
271 input_location = saved_loc;
272 return true;
273 }
274 \f
275 /* Return nonzero if S is not considered part of an
276 INTERFACE/IMPLEMENTATION pair. Otherwise, return 0. */
277
278 static int
279 interface_strcmp (const char* s)
280 {
281 /* Set the interface/implementation bits for this scope. */
282 struct impl_files *ifiles;
283 const char *s1;
284
285 for (ifiles = impl_file_chain; ifiles; ifiles = ifiles->next)
286 {
287 const char *t1 = ifiles->filename;
288 s1 = s;
289
290 if (*s1 == 0 || filename_ncmp (s1, t1, 1) != 0)
291 continue;
292
293 while (*s1 != 0 && filename_ncmp (s1, t1, 1) == 0)
294 s1++, t1++;
295
296 /* A match. */
297 if (*s1 == *t1)
298 return 0;
299
300 /* Don't get faked out by xxx.yyy.cc vs xxx.zzz.cc. */
301 if (strchr (s1, '.') || strchr (t1, '.'))
302 continue;
303
304 if (*s1 == '\0' || s1[-1] != '.' || t1[-1] != '.')
305 continue;
306
307 /* A match. */
308 return 0;
309 }
310
311 /* No matches. */
312 return 1;
313 }
314
315 \f
316
317 /* Parse a #pragma whose sole argument is a string constant.
318 If OPT is true, the argument is optional. */
319 static tree
320 parse_strconst_pragma (const char* name, int opt)
321 {
322 tree result, x;
323 enum cpp_ttype t;
324
325 t = pragma_lex (&result);
326 if (t == CPP_STRING)
327 {
328 if (pragma_lex (&x) != CPP_EOF)
329 warning (0, "junk at end of #pragma %s", name);
330 return result;
331 }
332
333 if (t == CPP_EOF && opt)
334 return NULL_TREE;
335
336 error ("invalid #pragma %s", name);
337 return error_mark_node;
338 }
339
340 static void
341 handle_pragma_vtable (cpp_reader* /*dfile*/)
342 {
343 parse_strconst_pragma ("vtable", 0);
344 sorry ("#pragma vtable no longer supported");
345 }
346
347 static void
348 handle_pragma_unit (cpp_reader* /*dfile*/)
349 {
350 /* Validate syntax, but don't do anything. */
351 parse_strconst_pragma ("unit", 0);
352 }
353
354 static void
355 handle_pragma_interface (cpp_reader* /*dfile*/)
356 {
357 tree fname = parse_strconst_pragma ("interface", 1);
358 struct c_fileinfo *finfo;
359 const char *filename;
360
361 if (fname == error_mark_node)
362 return;
363 else if (fname == 0)
364 filename = lbasename (LOCATION_FILE (input_location));
365 else
366 filename = TREE_STRING_POINTER (fname);
367
368 finfo = get_fileinfo (LOCATION_FILE (input_location));
369
370 if (impl_file_chain == 0)
371 {
372 /* If this is zero at this point, then we are
373 auto-implementing. */
374 if (main_input_filename == 0)
375 main_input_filename = LOCATION_FILE (input_location);
376 }
377
378 finfo->interface_only = interface_strcmp (filename);
379 /* If MULTIPLE_SYMBOL_SPACES is set, we cannot assume that we can see
380 a definition in another file. */
381 if (!MULTIPLE_SYMBOL_SPACES || !finfo->interface_only)
382 finfo->interface_unknown = 0;
383 }
384
385 /* Note that we have seen a #pragma implementation for the key MAIN_FILENAME.
386 We used to only allow this at toplevel, but that restriction was buggy
387 in older compilers and it seems reasonable to allow it in the headers
388 themselves, too. It only needs to precede the matching #p interface.
389
390 We don't touch finfo->interface_only or finfo->interface_unknown;
391 the user must specify a matching #p interface for this to have
392 any effect. */
393
394 static void
395 handle_pragma_implementation (cpp_reader* /*dfile*/)
396 {
397 tree fname = parse_strconst_pragma ("implementation", 1);
398 const char *filename;
399 struct impl_files *ifiles = impl_file_chain;
400
401 if (fname == error_mark_node)
402 return;
403
404 if (fname == 0)
405 {
406 if (main_input_filename)
407 filename = main_input_filename;
408 else
409 filename = LOCATION_FILE (input_location);
410 filename = lbasename (filename);
411 }
412 else
413 {
414 filename = TREE_STRING_POINTER (fname);
415 if (cpp_included_before (parse_in, filename, input_location))
416 warning (0, "#pragma implementation for %qs appears after "
417 "file is included", filename);
418 }
419
420 for (; ifiles; ifiles = ifiles->next)
421 {
422 if (! filename_cmp (ifiles->filename, filename))
423 break;
424 }
425 if (ifiles == 0)
426 {
427 ifiles = XNEW (struct impl_files);
428 ifiles->filename = xstrdup (filename);
429 ifiles->next = impl_file_chain;
430 impl_file_chain = ifiles;
431 }
432 }
433
434 /* Indicate that this file uses Java-personality exception handling. */
435 static void
436 handle_pragma_java_exceptions (cpp_reader* /*dfile*/)
437 {
438 tree x;
439 if (pragma_lex (&x) != CPP_EOF)
440 warning (0, "junk at end of #pragma GCC java_exceptions");
441
442 choose_personality_routine (lang_java);
443 pragma_java_exceptions = true;
444 }
445
446 /* Issue an error message indicating that the lookup of NAME (an
447 IDENTIFIER_NODE) failed. Returns the ERROR_MARK_NODE. */
448
449 tree
450 unqualified_name_lookup_error (tree name)
451 {
452 if (IDENTIFIER_OPNAME_P (name))
453 {
454 if (name != ansi_opname (ERROR_MARK))
455 error ("%qD not defined", name);
456 }
457 else
458 {
459 if (!objc_diagnose_private_ivar (name))
460 {
461 error ("%qD was not declared in this scope", name);
462 suggest_alternatives_for (location_of (name), name);
463 }
464 /* Prevent repeated error messages by creating a VAR_DECL with
465 this NAME in the innermost block scope. */
466 if (local_bindings_p ())
467 {
468 tree decl;
469 decl = build_decl (input_location,
470 VAR_DECL, name, error_mark_node);
471 DECL_CONTEXT (decl) = current_function_decl;
472 push_local_binding (name, decl, 0);
473 /* Mark the variable as used so that we do not get warnings
474 about it being unused later. */
475 TREE_USED (decl) = 1;
476 }
477 }
478
479 return error_mark_node;
480 }
481
482 /* Like unqualified_name_lookup_error, but NAME is an unqualified-id
483 used as a function. Returns an appropriate expression for
484 NAME. */
485
486 tree
487 unqualified_fn_lookup_error (tree name)
488 {
489 if (processing_template_decl)
490 {
491 /* In a template, it is invalid to write "f()" or "f(3)" if no
492 declaration of "f" is available. Historically, G++ and most
493 other compilers accepted that usage since they deferred all name
494 lookup until instantiation time rather than doing unqualified
495 name lookup at template definition time; explain to the user what
496 is going wrong.
497
498 Note that we have the exact wording of the following message in
499 the manual (trouble.texi, node "Name lookup"), so they need to
500 be kept in synch. */
501 permerror (input_location, "there are no arguments to %qD that depend on a template "
502 "parameter, so a declaration of %qD must be available",
503 name, name);
504
505 if (!flag_permissive)
506 {
507 static bool hint;
508 if (!hint)
509 {
510 inform (input_location, "(if you use %<-fpermissive%>, G++ will accept your "
511 "code, but allowing the use of an undeclared name is "
512 "deprecated)");
513 hint = true;
514 }
515 }
516 return name;
517 }
518
519 return unqualified_name_lookup_error (name);
520 }
521
522 /* Wrapper around build_lang_decl_loc(). Should gradually move to
523 build_lang_decl_loc() and then rename build_lang_decl_loc() back to
524 build_lang_decl(). */
525
526 tree
527 build_lang_decl (enum tree_code code, tree name, tree type)
528 {
529 return build_lang_decl_loc (input_location, code, name, type);
530 }
531
532 /* Build a decl from CODE, NAME, TYPE declared at LOC, and then add
533 DECL_LANG_SPECIFIC info to the result. */
534
535 tree
536 build_lang_decl_loc (location_t loc, enum tree_code code, tree name, tree type)
537 {
538 tree t;
539
540 t = build_decl (loc, code, name, type);
541 retrofit_lang_decl (t);
542
543 return t;
544 }
545
546 /* Add DECL_LANG_SPECIFIC info to T. Called from build_lang_decl
547 and pushdecl (for functions generated by the back end). */
548
549 void
550 retrofit_lang_decl (tree t)
551 {
552 struct lang_decl *ld;
553 size_t size;
554 int sel;
555
556 if (DECL_LANG_SPECIFIC (t))
557 return;
558
559 if (TREE_CODE (t) == FUNCTION_DECL)
560 sel = 1, size = sizeof (struct lang_decl_fn);
561 else if (TREE_CODE (t) == NAMESPACE_DECL)
562 sel = 2, size = sizeof (struct lang_decl_ns);
563 else if (TREE_CODE (t) == PARM_DECL)
564 sel = 3, size = sizeof (struct lang_decl_parm);
565 else if (LANG_DECL_HAS_MIN (t))
566 sel = 0, size = sizeof (struct lang_decl_min);
567 else
568 gcc_unreachable ();
569
570 ld = (struct lang_decl *) ggc_internal_cleared_alloc (size);
571
572 ld->u.base.selector = sel;
573
574 DECL_LANG_SPECIFIC (t) = ld;
575 if (current_lang_name == lang_name_cplusplus
576 || decl_linkage (t) == lk_none)
577 SET_DECL_LANGUAGE (t, lang_cplusplus);
578 else if (current_lang_name == lang_name_c)
579 SET_DECL_LANGUAGE (t, lang_c);
580 else if (current_lang_name == lang_name_java)
581 SET_DECL_LANGUAGE (t, lang_java);
582 else
583 gcc_unreachable ();
584
585 if (GATHER_STATISTICS)
586 {
587 tree_node_counts[(int)lang_decl] += 1;
588 tree_node_sizes[(int)lang_decl] += size;
589 }
590 }
591
592 void
593 cxx_dup_lang_specific_decl (tree node)
594 {
595 int size;
596 struct lang_decl *ld;
597
598 if (! DECL_LANG_SPECIFIC (node))
599 return;
600
601 if (TREE_CODE (node) == FUNCTION_DECL)
602 size = sizeof (struct lang_decl_fn);
603 else if (TREE_CODE (node) == NAMESPACE_DECL)
604 size = sizeof (struct lang_decl_ns);
605 else if (TREE_CODE (node) == PARM_DECL)
606 size = sizeof (struct lang_decl_parm);
607 else if (LANG_DECL_HAS_MIN (node))
608 size = sizeof (struct lang_decl_min);
609 else
610 gcc_unreachable ();
611
612 ld = (struct lang_decl *) ggc_internal_alloc (size);
613 memcpy (ld, DECL_LANG_SPECIFIC (node), size);
614 DECL_LANG_SPECIFIC (node) = ld;
615
616 if (GATHER_STATISTICS)
617 {
618 tree_node_counts[(int)lang_decl] += 1;
619 tree_node_sizes[(int)lang_decl] += size;
620 }
621 }
622
623 /* Copy DECL, including any language-specific parts. */
624
625 tree
626 copy_decl (tree decl)
627 {
628 tree copy;
629
630 copy = copy_node (decl);
631 cxx_dup_lang_specific_decl (copy);
632 return copy;
633 }
634
635 /* Replace the shared language-specific parts of NODE with a new copy. */
636
637 static void
638 copy_lang_type (tree node)
639 {
640 int size;
641 struct lang_type *lt;
642
643 if (! TYPE_LANG_SPECIFIC (node))
644 return;
645
646 if (TYPE_LANG_SPECIFIC (node)->u.h.is_lang_type_class)
647 size = sizeof (struct lang_type);
648 else
649 size = sizeof (struct lang_type_ptrmem);
650 lt = (struct lang_type *) ggc_internal_alloc (size);
651 memcpy (lt, TYPE_LANG_SPECIFIC (node), size);
652 TYPE_LANG_SPECIFIC (node) = lt;
653
654 if (GATHER_STATISTICS)
655 {
656 tree_node_counts[(int)lang_type] += 1;
657 tree_node_sizes[(int)lang_type] += size;
658 }
659 }
660
661 /* Copy TYPE, including any language-specific parts. */
662
663 tree
664 copy_type (tree type)
665 {
666 tree copy;
667
668 copy = copy_node (type);
669 copy_lang_type (copy);
670 return copy;
671 }
672
673 tree
674 cxx_make_type (enum tree_code code)
675 {
676 tree t = make_node (code);
677
678 /* Create lang_type structure. */
679 if (RECORD_OR_UNION_CODE_P (code)
680 || code == BOUND_TEMPLATE_TEMPLATE_PARM)
681 {
682 struct lang_type *pi
683 = (struct lang_type *) ggc_internal_cleared_alloc
684 (sizeof (struct lang_type));
685
686 TYPE_LANG_SPECIFIC (t) = pi;
687 pi->u.c.h.is_lang_type_class = 1;
688
689 if (GATHER_STATISTICS)
690 {
691 tree_node_counts[(int)lang_type] += 1;
692 tree_node_sizes[(int)lang_type] += sizeof (struct lang_type);
693 }
694 }
695
696 /* Set up some flags that give proper default behavior. */
697 if (RECORD_OR_UNION_CODE_P (code))
698 {
699 struct c_fileinfo *finfo = \
700 get_fileinfo (LOCATION_FILE (input_location));
701 SET_CLASSTYPE_INTERFACE_UNKNOWN_X (t, finfo->interface_unknown);
702 CLASSTYPE_INTERFACE_ONLY (t) = finfo->interface_only;
703 }
704
705 return t;
706 }
707
708 tree
709 make_class_type (enum tree_code code)
710 {
711 tree t = cxx_make_type (code);
712 SET_CLASS_TYPE_P (t, 1);
713 return t;
714 }
715
716 /* Returns true if we are currently in the main source file, or in a
717 template instantiation started from the main source file. */
718
719 bool
720 in_main_input_context (void)
721 {
722 struct tinst_level *tl = outermost_tinst_level();
723
724 if (tl)
725 return filename_cmp (main_input_filename,
726 LOCATION_FILE (tl->locus)) == 0;
727 else
728 return filename_cmp (main_input_filename, LOCATION_FILE (input_location)) == 0;
729 }