2 Copyright 2009 Free Software Foundation, Inc.
3 Contributed by CodeSourcery, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 3, or (at your option) any later
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
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/>. */
23 #include "coretypes.h"
27 #include "ggc.h" /* lambda.h needs this */
28 #include "lambda.h" /* gcd */
30 #include "plugin-api.h"
31 #include "lto-streamer.h"
33 /* Vector to keep track of external variables we've seen so far. */
34 VEC(tree,gc) *lto_global_var_decls;
36 /* Base type for resolution map. It maps NODE to resolution. */
38 struct GTY(()) lto_symtab_base_def
40 /* Key is either an IDENTIFIER or a DECL. */
43 typedef struct lto_symtab_base_def *lto_symtab_base_t;
45 struct GTY(()) lto_symtab_identifier_def
47 struct lto_symtab_base_def base;
50 typedef struct lto_symtab_identifier_def *lto_symtab_identifier_t;
52 struct GTY(()) lto_symtab_decl_def
54 struct lto_symtab_base_def base;
55 enum ld_plugin_symbol_resolution resolution;
56 struct lto_file_decl_data * GTY((skip (""))) file_data;
58 typedef struct lto_symtab_decl_def *lto_symtab_decl_t;
60 /* A poor man's symbol table. This hashes identifier to prevailing DECL
63 static GTY ((if_marked ("lto_symtab_identifier_marked_p"),
64 param_is (struct lto_symtab_identifier_def)))
65 htab_t lto_symtab_identifiers;
67 static GTY ((if_marked ("lto_symtab_decl_marked_p"),
68 param_is (struct lto_symtab_decl_def)))
69 htab_t lto_symtab_decls;
71 /* Return the hash value of an lto_symtab_base_t object pointed to by P. */
74 lto_symtab_base_hash (const void *p)
76 const struct lto_symtab_base_def *base =
77 (const struct lto_symtab_base_def*) p;
78 return htab_hash_pointer (base->node);
81 /* Return non-zero if P1 and P2 points to lto_symtab_base_def structs
82 corresponding to the same tree node. */
85 lto_symtab_base_eq (const void *p1, const void *p2)
87 const struct lto_symtab_base_def *base1 =
88 (const struct lto_symtab_base_def *) p1;
89 const struct lto_symtab_base_def *base2 =
90 (const struct lto_symtab_base_def *) p2;
91 return (base1->node == base2->node);
94 /* Returns non-zero if P points to an lto_symtab_base_def struct that needs
95 to be marked for GC. */
98 lto_symtab_base_marked_p (const void *p)
100 const struct lto_symtab_base_def *base =
101 (const struct lto_symtab_base_def *) p;
103 /* Keep this only if the key node is marked. */
104 return ggc_marked_p (base->node);
107 /* Returns non-zero if P points to an lto_symtab_identifier_def struct that
108 needs to be marked for GC. */
111 lto_symtab_identifier_marked_p (const void *p)
113 return lto_symtab_base_marked_p (p);
116 /* Returns non-zero if P points to an lto_symtab_decl_def struct that needs
117 to be marked for GC. */
120 lto_symtab_decl_marked_p (const void *p)
122 return lto_symtab_base_marked_p (p);
125 #define lto_symtab_identifier_eq lto_symtab_base_eq
126 #define lto_symtab_identifier_hash lto_symtab_base_hash
127 #define lto_symtab_decl_eq lto_symtab_base_eq
128 #define lto_symtab_decl_hash lto_symtab_base_hash
130 /* Lazily initialize resolution hash tables. */
133 lto_symtab_maybe_init_hash_tables (void)
135 if (!lto_symtab_identifiers)
137 lto_symtab_identifiers =
138 htab_create_ggc (1021, lto_symtab_identifier_hash,
139 lto_symtab_identifier_eq, NULL);
141 htab_create_ggc (1021, lto_symtab_decl_hash,
142 lto_symtab_decl_eq, NULL);
146 /* Returns true iff the union of ATTRIBUTES_1 and ATTRIBUTES_2 can be
149 lto_compatible_attributes_p (tree decl ATTRIBUTE_UNUSED,
154 /* ??? For now, assume two attribute sets are compatible only if they
156 return !attributes_1 && !attributes_2;
158 /* FIXME. For the moment, live dangerously, and assume the user knows
159 what he's doing. I don't think the linker would distinguish these cases. */
160 return true || (!attributes_1 && !attributes_2);
164 /* Helper for lto_symtab_compatible. Return TRUE if DECL is an external
165 variable declaration of an aggregate type. */
168 external_aggregate_decl_p (tree decl)
170 return (TREE_CODE (decl) == VAR_DECL
171 && DECL_EXTERNAL (decl)
172 && AGGREGATE_TYPE_P (TREE_TYPE (decl)));
175 static bool maybe_merge_incomplete_and_complete_type (tree, tree);
177 /* Try to merge an incomplete type INCOMPLETE with a complete type
178 COMPLETE of same kinds.
179 Return true if they were merged, false otherwise. */
182 merge_incomplete_and_complete_type (tree incomplete, tree complete)
184 /* For merging array types do some extra sanity checking. */
185 if (TREE_CODE (incomplete) == ARRAY_TYPE
186 && !maybe_merge_incomplete_and_complete_type (TREE_TYPE (incomplete),
187 TREE_TYPE (complete))
188 && !gimple_types_compatible_p (TREE_TYPE (incomplete),
189 TREE_TYPE (complete)))
192 /* ??? Ideally we would do this by means of a common canonical type, but
193 that's difficult as we do not have links from the canonical type
194 back to all its children. */
195 gimple_force_type_merge (incomplete, complete);
200 /* Try to merge a maybe complete / incomplete type pair TYPE1 and TYPE2.
201 Return true if they were merged, false otherwise. */
204 maybe_merge_incomplete_and_complete_type (tree type1, tree type2)
208 if (TREE_CODE (type1) != TREE_CODE (type2))
211 if (!COMPLETE_TYPE_P (type1) && COMPLETE_TYPE_P (type2))
212 res = merge_incomplete_and_complete_type (type1, type2);
213 else if (COMPLETE_TYPE_P (type1) && !COMPLETE_TYPE_P (type2))
214 res = merge_incomplete_and_complete_type (type2, type1);
216 /* Recurse on pointer targets. */
218 && POINTER_TYPE_P (type1)
219 && POINTER_TYPE_P (type2))
220 res = maybe_merge_incomplete_and_complete_type (TREE_TYPE (type1),
226 /* Check if OLD_DECL and NEW_DECL are compatible. */
229 lto_symtab_compatible (tree old_decl, tree new_decl)
231 tree merged_type = NULL_TREE;
233 if (TREE_CODE (old_decl) != TREE_CODE (new_decl))
235 switch (TREE_CODE (new_decl))
238 gcc_assert (TREE_CODE (old_decl) == FUNCTION_DECL);
239 error_at (DECL_SOURCE_LOCATION (new_decl),
240 "function %qD redeclared as variable", new_decl);
241 inform (DECL_SOURCE_LOCATION (old_decl),
242 "previously declared here");
246 gcc_assert (TREE_CODE (old_decl) == VAR_DECL);
247 error_at (DECL_SOURCE_LOCATION (new_decl),
248 "variable %qD redeclared as function", new_decl);
249 inform (DECL_SOURCE_LOCATION (old_decl),
250 "previously declared here");
258 /* Handle external declarations with incomplete type or pointed-to
259 incomplete types by forcefully merging the types.
260 ??? In principle all types involved in the two decls should
261 be merged forcefully, for example without considering type or
263 if (TREE_CODE (old_decl) == VAR_DECL)
265 tree old_type = TREE_TYPE (old_decl);
266 tree new_type = TREE_TYPE (new_decl);
268 if (DECL_EXTERNAL (old_decl) || DECL_EXTERNAL (new_decl))
269 maybe_merge_incomplete_and_complete_type (old_type, new_type);
270 else if (POINTER_TYPE_P (old_type)
271 && POINTER_TYPE_P (new_type))
272 maybe_merge_incomplete_and_complete_type (TREE_TYPE (old_type),
273 TREE_TYPE (new_type));
275 /* For array types we have to accept external declarations with
276 different sizes than the actual definition (164.gzip).
277 ??? We could emit a warning here. */
278 if (TREE_CODE (old_type) == TREE_CODE (new_type)
279 && TREE_CODE (old_type) == ARRAY_TYPE
280 && COMPLETE_TYPE_P (old_type)
281 && COMPLETE_TYPE_P (new_type)
282 && tree_int_cst_compare (TYPE_SIZE (old_type),
283 TYPE_SIZE (new_type)) != 0
284 && gimple_types_compatible_p (TREE_TYPE (old_type),
285 TREE_TYPE (new_type)))
287 /* If only one is external use the type of the non-external decl.
288 Else use the larger one and also adjust the decl size.
289 ??? Directional merging would allow us to simply pick the
290 larger one instead of rewriting it. */
291 if (DECL_EXTERNAL (old_decl) ^ DECL_EXTERNAL (new_decl))
293 if (DECL_EXTERNAL (old_decl))
294 TREE_TYPE (old_decl) = new_type;
295 else if (DECL_EXTERNAL (new_decl))
296 TREE_TYPE (new_decl) = old_type;
300 if (tree_int_cst_compare (TYPE_SIZE (old_type),
301 TYPE_SIZE (new_type)) < 0)
303 TREE_TYPE (old_decl) = new_type;
304 DECL_SIZE (old_decl) = DECL_SIZE (new_decl);
305 DECL_SIZE_UNIT (old_decl) = DECL_SIZE_UNIT (new_decl);
309 TREE_TYPE (new_decl) = old_type;
310 DECL_SIZE (new_decl) = DECL_SIZE (old_decl);
311 DECL_SIZE_UNIT (new_decl) = DECL_SIZE_UNIT (old_decl);
317 if (!gimple_types_compatible_p (TREE_TYPE (old_decl), TREE_TYPE (new_decl)))
319 if (TREE_CODE (new_decl) == FUNCTION_DECL)
322 /* We want either of the types to have argument types,
324 && ((TYPE_ARG_TYPES (TREE_TYPE (old_decl)) != NULL)
325 ^ (TYPE_ARG_TYPES (TREE_TYPE (new_decl)) != NULL)))
327 /* The situation here is that (in C) somebody was smart
328 enough to use proper declarations in a header file, but
329 the actual definition of the function uses
330 non-ANSI-style argument lists. Or we have a situation
331 where declarations weren't used anywhere and we're
332 merging the actual definition with a use. One of the
333 decls will then have a complete function type, whereas
334 the other will only have a result type. Assume that
335 the more complete type is the right one and don't
337 if (TYPE_ARG_TYPES (TREE_TYPE (old_decl)))
339 merged_type = TREE_TYPE (old_decl);
343 merged_type = TREE_TYPE (new_decl);
347 /* If we don't have a merged type yet...sigh. The linker
348 wouldn't complain if the types were mismatched, so we
349 probably shouldn't either. Just use the type from
350 whichever decl appears to be associated with the
351 definition. If for some odd reason neither decl is, the
355 if (!DECL_EXTERNAL (new_decl))
357 merged_type = TREE_TYPE (new_decl);
361 merged_type = TREE_TYPE (old_decl);
368 if (warning_at (DECL_SOURCE_LOCATION (new_decl), 0,
369 "type of %qD does not match original declaration",
371 inform (DECL_SOURCE_LOCATION (old_decl),
372 "previously declared here");
377 if (DECL_UNSIGNED (old_decl) != DECL_UNSIGNED (new_decl))
379 error_at (DECL_SOURCE_LOCATION (new_decl),
380 "signedness of %qD does not match original declaration",
382 inform (DECL_SOURCE_LOCATION (old_decl), "previously declared here");
386 if (!tree_int_cst_equal (DECL_SIZE (old_decl),
387 DECL_SIZE (new_decl))
388 || !tree_int_cst_equal (DECL_SIZE_UNIT (old_decl),
389 DECL_SIZE_UNIT (new_decl)))
391 /* Permit cases where we are declaring aggregates and at least one
392 of the decls is external and one of the decls has a size whereas
393 the other one does not. This is perfectly legal in C:
404 There is no way a compiler can tell the size of x. So we cannot
405 assume that external aggreates have complete types. */
407 if (!((TREE_CODE (TREE_TYPE (old_decl))
408 == TREE_CODE (TREE_TYPE (new_decl)))
409 && ((external_aggregate_decl_p (old_decl)
410 && DECL_SIZE (old_decl) == NULL_TREE)
411 || (external_aggregate_decl_p (new_decl)
412 && DECL_SIZE (new_decl) == NULL_TREE))))
414 error_at (DECL_SOURCE_LOCATION (new_decl),
415 "size of %qD does not match original declaration",
417 inform (DECL_SOURCE_LOCATION (old_decl),
418 "previously declared here");
423 /* Report an error if user-specified alignments do not match. */
424 if ((DECL_USER_ALIGN (old_decl) && DECL_USER_ALIGN (new_decl))
425 && DECL_ALIGN (old_decl) != DECL_ALIGN (new_decl))
427 error_at (DECL_SOURCE_LOCATION (new_decl),
428 "alignment of %qD does not match original declaration",
430 inform (DECL_SOURCE_LOCATION (old_decl), "previously declared here");
434 /* Do not compare the modes of the decls. The type compatibility
435 checks or the completing of types has properly dealt with all issues. */
437 if (!lto_compatible_attributes_p (old_decl,
438 DECL_ATTRIBUTES (old_decl),
439 DECL_ATTRIBUTES (new_decl)))
441 error_at (DECL_SOURCE_LOCATION (new_decl),
442 "attributes applied to %qD are incompatible with original "
443 "declaration", new_decl);
444 inform (DECL_SOURCE_LOCATION (old_decl), "previously declared here");
448 /* We do not require matches for:
452 Only the name used in object files matters.
456 An entity might be declared in a C++ namespace in one file and
457 with a C identifier in another file.
459 - TREE_PRIVATE, TREE_PROTECTED
461 Access control is the problem of the front end that created the
464 Therefore, at this point we have decided to merge the declarations. */
469 /* Marks decl DECL as having resolution RESOLUTION. */
472 lto_symtab_set_resolution_and_file_data (tree decl,
473 ld_plugin_symbol_resolution_t
475 struct lto_file_decl_data *file_data)
477 lto_symtab_decl_t new_entry;
482 gcc_assert (TREE_PUBLIC (decl));
483 gcc_assert (TREE_CODE (decl) != FUNCTION_DECL || !DECL_ABSTRACT (decl));
485 new_entry = GGC_CNEW (struct lto_symtab_decl_def);
486 new_entry->base.node = decl;
487 new_entry->resolution = resolution;
488 new_entry->file_data = file_data;
490 lto_symtab_maybe_init_hash_tables ();
491 slot = htab_find_slot (lto_symtab_decls, new_entry, INSERT);
496 /* Get the lto_symtab_identifier_def struct associated with ID
497 if there is one. If there is none and INSERT_P is true, create
500 static lto_symtab_identifier_t
501 lto_symtab_get_identifier (tree id, bool insert_p)
503 struct lto_symtab_identifier_def temp;
504 lto_symtab_identifier_t symtab_id;
507 lto_symtab_maybe_init_hash_tables ();
509 slot = htab_find_slot (lto_symtab_identifiers, &temp,
510 insert_p ? INSERT : NO_INSERT);
514 return (lto_symtab_identifier_t) *slot;
517 symtab_id = GGC_CNEW (struct lto_symtab_identifier_def);
518 symtab_id->base.node = id;
524 return slot ? (lto_symtab_identifier_t) *slot : NULL;
527 /* Return the DECL associated with an IDENTIFIER ID or return NULL_TREE
531 lto_symtab_get_identifier_decl (tree id)
533 lto_symtab_identifier_t symtab_id = lto_symtab_get_identifier (id, false);
534 return symtab_id ? symtab_id->decl : NULL_TREE;
537 /* SET the associated DECL of an IDENTIFIER ID to be DECL. */
540 lto_symtab_set_identifier_decl (tree id, tree decl)
542 lto_symtab_identifier_t symtab_id = lto_symtab_get_identifier (id, true);
543 symtab_id->decl = decl;
546 /* Common helper function for merging variable and function declarations.
547 NEW_DECL is the newly found decl. RESOLUTION is the decl's resolution
548 provided by the linker. */
551 lto_symtab_merge_decl (tree new_decl,
552 enum ld_plugin_symbol_resolution resolution,
553 struct lto_file_decl_data *file_data)
557 ld_plugin_symbol_resolution_t old_resolution;
559 gcc_assert (TREE_CODE (new_decl) == VAR_DECL
560 || TREE_CODE (new_decl) == FUNCTION_DECL);
562 gcc_assert (TREE_PUBLIC (new_decl));
564 gcc_assert (DECL_LANG_SPECIFIC (new_decl) == NULL);
566 /* Check that declarations reaching this function do not have
567 properties inconsistent with having external linkage. If any of
568 these asertions fail, then the object file reader has failed to
569 detect these cases and issue appropriate error messages. */
570 if (TREE_CODE (new_decl) == VAR_DECL)
571 gcc_assert (!(DECL_EXTERNAL (new_decl) && DECL_INITIAL (new_decl)));
573 /* Remember the resolution of this symbol. */
574 lto_symtab_set_resolution_and_file_data (new_decl, resolution, file_data);
576 /* Ensure DECL_ASSEMBLER_NAME will not set assembler name. */
577 gcc_assert (DECL_ASSEMBLER_NAME_SET_P (new_decl));
579 /* Retrieve the previous declaration. */
580 name = DECL_ASSEMBLER_NAME (new_decl);
581 old_decl = lto_symtab_get_identifier_decl (name);
583 /* If there was no previous declaration, then there is nothing to
587 lto_symtab_set_identifier_decl (name, new_decl);
588 VEC_safe_push (tree, gc, lto_global_var_decls, new_decl);
592 /* Give ODR violation errors. */
593 old_resolution = lto_symtab_get_resolution (old_decl);
594 if (resolution == LDPR_PREVAILING_DEF
595 || resolution == LDPR_PREVAILING_DEF_IRONLY)
597 if ((old_resolution == LDPR_PREVAILING_DEF
598 || old_resolution == LDPR_PREVAILING_DEF_IRONLY)
599 && (old_resolution != resolution || flag_no_common))
601 error_at (DECL_SOURCE_LOCATION (new_decl),
602 "%qD has already been defined", new_decl);
603 inform (DECL_SOURCE_LOCATION (old_decl),
604 "previously defined here");
609 /* The linker may ask us to combine two incompatible symbols.
610 Find a decl we can merge with or chain it in the list of decls
613 && !lto_symtab_compatible (old_decl, new_decl))
614 old_decl = (tree) DECL_LANG_SPECIFIC (old_decl);
617 old_decl = lto_symtab_get_identifier_decl (name);
618 while (DECL_LANG_SPECIFIC (old_decl) != NULL)
619 old_decl = (tree) DECL_LANG_SPECIFIC (old_decl);
620 DECL_LANG_SPECIFIC (old_decl) = (struct lang_decl *) new_decl;
624 /* Merge decl state in both directions, we may still end up using
626 TREE_ADDRESSABLE (old_decl) |= TREE_ADDRESSABLE (new_decl);
627 TREE_ADDRESSABLE (new_decl) |= TREE_ADDRESSABLE (old_decl);
629 gcc_assert (resolution != LDPR_UNKNOWN
630 && resolution != LDPR_UNDEF
631 && old_resolution != LDPR_UNKNOWN
632 && old_resolution != LDPR_UNDEF);
634 if (resolution == LDPR_PREVAILING_DEF
635 || resolution == LDPR_PREVAILING_DEF_IRONLY)
638 gcc_assert (old_resolution == LDPR_PREEMPTED_IR
639 || old_resolution == LDPR_RESOLVED_IR
640 || (old_resolution == resolution && !flag_no_common));
641 DECL_LANG_SPECIFIC (new_decl) = DECL_LANG_SPECIFIC (old_decl);
642 DECL_LANG_SPECIFIC (old_decl) = NULL;
643 decl = lto_symtab_get_identifier_decl (name);
644 if (decl == old_decl)
646 lto_symtab_set_identifier_decl (name, new_decl);
649 while ((tree) DECL_LANG_SPECIFIC (decl) != old_decl)
650 decl = (tree) DECL_LANG_SPECIFIC (decl);
651 DECL_LANG_SPECIFIC (decl) = (struct lang_decl *) new_decl;
655 if (resolution == LDPR_PREEMPTED_REG
656 || resolution == LDPR_RESOLVED_EXEC
657 || resolution == LDPR_RESOLVED_DYN)
658 gcc_assert (old_resolution == LDPR_PREEMPTED_REG
659 || old_resolution == LDPR_RESOLVED_EXEC
660 || old_resolution == LDPR_RESOLVED_DYN);
662 if (resolution == LDPR_PREEMPTED_IR
663 || resolution == LDPR_RESOLVED_IR)
664 gcc_assert (old_resolution == LDPR_PREVAILING_DEF
665 || old_resolution == LDPR_PREVAILING_DEF_IRONLY
666 || old_resolution == LDPR_PREEMPTED_IR
667 || old_resolution == LDPR_RESOLVED_IR);
673 /* Merge the VAR_DECL NEW_VAR with resolution RESOLUTION with any previous
674 declaration with the same name. */
677 lto_symtab_merge_var (tree new_var, enum ld_plugin_symbol_resolution resolution)
679 lto_symtab_merge_decl (new_var, resolution, NULL);
682 /* Merge the FUNCTION_DECL NEW_FN with resolution RESOLUTION with any previous
683 declaration with the same name. */
686 lto_symtab_merge_fn (tree new_fn, enum ld_plugin_symbol_resolution resolution,
687 struct lto_file_decl_data *file_data)
689 lto_symtab_merge_decl (new_fn, resolution, file_data);
692 /* Given the decl DECL, return the prevailing decl with the same name. */
695 lto_symtab_prevailing_decl (tree decl)
700 /* Builtins and local symbols are their own prevailing decl. */
701 if (!TREE_PUBLIC (decl) || is_builtin_fn (decl))
704 /* DECL_ABSTRACTs are their own prevailng decl. */
705 if (TREE_CODE (decl) == FUNCTION_DECL && DECL_ABSTRACT (decl))
708 /* Ensure DECL_ASSEMBLER_NAME will not set assembler name. */
709 gcc_assert (DECL_ASSEMBLER_NAME_SET_P (decl));
711 /* Walk through the list of candidates and return the one we merged to. */
712 ret = lto_symtab_get_identifier_decl (DECL_ASSEMBLER_NAME (decl));
714 || DECL_LANG_SPECIFIC (ret) == NULL)
717 /* If there are multiple decls to choose from find the one we merged
718 with and return that. */
721 if (gimple_types_compatible_p (TREE_TYPE (decl), TREE_TYPE (ret)))
724 ret = (tree) DECL_LANG_SPECIFIC (ret);
730 /* Return the hash table entry of DECL. */
732 static struct lto_symtab_decl_def *
733 lto_symtab_get_symtab_def (tree decl)
735 struct lto_symtab_decl_def temp, *symtab_decl;
740 lto_symtab_maybe_init_hash_tables ();
741 temp.base.node = decl;
742 slot = htab_find_slot (lto_symtab_decls, &temp, NO_INSERT);
743 gcc_assert (slot && *slot);
744 symtab_decl = (struct lto_symtab_decl_def*) *slot;
748 /* Return the resolution of DECL. */
750 enum ld_plugin_symbol_resolution
751 lto_symtab_get_resolution (tree decl)
755 if (!TREE_PUBLIC (decl) || is_builtin_fn (decl))
756 return LDPR_PREVAILING_DEF_IRONLY;
758 /* FIXME lto: There should be no DECL_ABSTRACT in the middle end. */
759 if (TREE_CODE (decl) == FUNCTION_DECL && DECL_ABSTRACT (decl))
760 return LDPR_PREVAILING_DEF_IRONLY;
762 return lto_symtab_get_symtab_def (decl)->resolution;
765 /* Return the file of DECL. */
767 struct lto_file_decl_data *
768 lto_symtab_get_file_data (tree decl)
770 return lto_symtab_get_symtab_def (decl)->file_data;
773 /* Remove any storage used to store resolution of DECL. */
776 lto_symtab_clear_resolution (tree decl)
778 struct lto_symtab_decl_def temp;
781 if (!TREE_PUBLIC (decl))
784 /* LTO FIXME: There should be no DECL_ABSTRACT in the middle end. */
785 if (TREE_CODE (decl) == FUNCTION_DECL && DECL_ABSTRACT (decl))
788 lto_symtab_maybe_init_hash_tables ();
789 temp.base.node = decl;
790 htab_remove_elt (lto_symtab_decls, &temp);
793 #include "gt-lto-symtab.h"