2 Copyright (C) 2009-2015 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"
24 #include "diagnostic-core.h"
28 #include "double-int.h"
36 #include "fold-const.h"
39 #include "hard-reg-set.h"
42 #include "basic-block.h"
43 #include "tree-ssa-alias.h"
44 #include "internal-fn.h"
45 #include "gimple-expr.h"
48 #include "plugin-api.h"
52 #include "lto-streamer.h"
53 #include "ipa-utils.h"
54 #include "alloc-pool.h"
55 #include "symbol-summary.h"
57 #include "ipa-inline.h"
60 /* Replace the cgraph node NODE with PREVAILING_NODE in the cgraph, merging
61 all edges and removing the old node. */
64 lto_cgraph_replace_node (struct cgraph_node
*node
,
65 struct cgraph_node
*prevailing_node
)
67 struct cgraph_edge
*e
, *next
;
70 if (symtab
->dump_file
)
72 fprintf (symtab
->dump_file
, "Replacing cgraph node %s/%i by %s/%i"
74 node
->name (), node
->order
,
75 prevailing_node
->name (),
76 prevailing_node
->order
,
77 IDENTIFIER_POINTER ((*targetm
.asm_out
.mangle_assembler_name
)
78 (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (node
->decl
)))));
81 /* Merge node flags. */
82 if (node
->force_output
)
83 prevailing_node
->mark_force_output ();
84 if (node
->forced_by_abi
)
85 prevailing_node
->forced_by_abi
= true;
86 if (node
->address_taken
)
88 gcc_assert (!prevailing_node
->global
.inlined_to
);
89 prevailing_node
->mark_address_taken ();
92 /* Redirect all incoming edges. */
94 = types_compatible_p (TREE_TYPE (TREE_TYPE (prevailing_node
->decl
)),
95 TREE_TYPE (TREE_TYPE (node
->decl
)));
96 for (e
= node
->callers
; e
; e
= next
)
98 next
= e
->next_caller
;
99 e
->redirect_callee (prevailing_node
);
100 /* If there is a mismatch between the supposed callee return type and
101 the real one do not attempt to inline this function.
102 ??? We really need a way to match function signatures for ABI
103 compatibility and perform related promotions at inlining time. */
105 e
->call_stmt_cannot_inline_p
= 1;
107 /* Redirect incomming references. */
108 prevailing_node
->clone_referring (node
);
110 /* Fix instrumentation references. */
111 if (node
->instrumented_version
)
113 gcc_assert (node
->instrumentation_clone
114 == prevailing_node
->instrumentation_clone
);
115 node
->instrumented_version
->instrumented_version
= prevailing_node
;
116 if (!prevailing_node
->instrumented_version
)
117 prevailing_node
->instrumented_version
= node
->instrumented_version
;
118 /* Need to reset node->instrumented_version to NULL,
119 otherwise node removal code would reset
120 node->instrumented_version->instrumented_version. */
121 node
->instrumented_version
= NULL
;
124 ipa_merge_profiles (prevailing_node
, node
);
125 lto_free_function_in_decl_state_for_node (node
);
127 if (node
->decl
!= prevailing_node
->decl
)
128 node
->release_body ();
130 /* Finally remove the replaced node. */
134 /* Replace the cgraph node NODE with PREVAILING_NODE in the cgraph, merging
135 all edges and removing the old node. */
138 lto_varpool_replace_node (varpool_node
*vnode
,
139 varpool_node
*prevailing_node
)
141 gcc_assert (!vnode
->definition
|| prevailing_node
->definition
);
142 gcc_assert (!vnode
->analyzed
|| prevailing_node
->analyzed
);
144 prevailing_node
->clone_referring (vnode
);
145 if (vnode
->force_output
)
146 prevailing_node
->force_output
= true;
147 if (vnode
->forced_by_abi
)
148 prevailing_node
->forced_by_abi
= true;
150 /* Be sure we can garbage collect the initializer. */
151 if (DECL_INITIAL (vnode
->decl
)
152 && vnode
->decl
!= prevailing_node
->decl
)
153 DECL_INITIAL (vnode
->decl
) = error_mark_node
;
155 /* Check and report ODR violations on virtual tables. */
156 if (DECL_VIRTUAL_P (vnode
->decl
) || DECL_VIRTUAL_P (prevailing_node
->decl
))
157 compare_virtual_tables (prevailing_node
, vnode
);
159 if (vnode
->tls_model
!= prevailing_node
->tls_model
)
163 /* Non-TLS and TLS never mix together. Also emulated model is not
164 compatible with anything else. */
165 if (prevailing_node
->tls_model
== TLS_MODEL_NONE
166 || prevailing_node
->tls_model
== TLS_MODEL_EMULATED
167 || vnode
->tls_model
== TLS_MODEL_NONE
168 || vnode
->tls_model
== TLS_MODEL_EMULATED
)
170 /* Linked is silently supporting transitions
171 GD -> IE, GD -> LE, LD -> LE, IE -> LE, LD -> IE.
172 Do the same transitions and error out on others. */
173 else if ((prevailing_node
->tls_model
== TLS_MODEL_REAL
174 || prevailing_node
->tls_model
== TLS_MODEL_LOCAL_DYNAMIC
)
175 && (vnode
->tls_model
== TLS_MODEL_INITIAL_EXEC
176 || vnode
->tls_model
== TLS_MODEL_LOCAL_EXEC
))
177 prevailing_node
->tls_model
= vnode
->tls_model
;
178 else if ((vnode
->tls_model
== TLS_MODEL_REAL
179 || vnode
->tls_model
== TLS_MODEL_LOCAL_DYNAMIC
)
180 && (prevailing_node
->tls_model
== TLS_MODEL_INITIAL_EXEC
181 || prevailing_node
->tls_model
== TLS_MODEL_LOCAL_EXEC
))
183 else if (prevailing_node
->tls_model
== TLS_MODEL_INITIAL_EXEC
184 && vnode
->tls_model
== TLS_MODEL_LOCAL_EXEC
)
185 prevailing_node
->tls_model
= vnode
->tls_model
;
186 else if (vnode
->tls_model
== TLS_MODEL_INITIAL_EXEC
187 && prevailing_node
->tls_model
== TLS_MODEL_LOCAL_EXEC
)
193 error_at (DECL_SOURCE_LOCATION (vnode
->decl
),
194 "%qD is defined with tls model %s", vnode
->decl
, tls_model_names
[vnode
->tls_model
]);
195 inform (DECL_SOURCE_LOCATION (prevailing_node
->decl
),
196 "previously defined here as %s",
197 tls_model_names
[prevailing_node
->tls_model
]);
200 /* Finally remove the replaced node. */
204 /* Merge two variable or function symbol table entries PREVAILING and ENTRY.
205 Return false if the symbols are not fully compatible and a diagnostic
206 should be emitted. */
209 lto_symtab_merge (symtab_node
*prevailing
, symtab_node
*entry
)
211 tree prevailing_decl
= prevailing
->decl
;
212 tree decl
= entry
->decl
;
213 tree prevailing_type
, type
;
215 if (prevailing_decl
== decl
)
218 /* Merge decl state in both directions, we may still end up using
220 TREE_ADDRESSABLE (prevailing_decl
) |= TREE_ADDRESSABLE (decl
);
221 TREE_ADDRESSABLE (decl
) |= TREE_ADDRESSABLE (prevailing_decl
);
223 /* The linker may ask us to combine two incompatible symbols.
224 Detect this case and notify the caller of required diagnostics. */
226 if (TREE_CODE (decl
) == FUNCTION_DECL
)
228 if (!types_compatible_p (TREE_TYPE (prevailing_decl
),
230 /* If we don't have a merged type yet...sigh. The linker
231 wouldn't complain if the types were mismatched, so we
232 probably shouldn't either. Just use the type from
233 whichever decl appears to be associated with the
234 definition. If for some odd reason neither decl is, the
241 /* Now we exclusively deal with VAR_DECLs. */
243 /* Sharing a global symbol is a strong hint that two types are
244 compatible. We could use this information to complete
245 incomplete pointed-to types more aggressively here, ignoring
246 mismatches in both field and tag names. It's difficult though
247 to guarantee that this does not have side-effects on merging
248 more compatible types from other translation units though. */
250 /* We can tolerate differences in type qualification, the
251 qualification of the prevailing definition will prevail.
252 ??? In principle we might want to only warn for structurally
253 incompatible types here, but unless we have protective measures
254 for TBAA in place that would hide useful information. */
255 prevailing_type
= TYPE_MAIN_VARIANT (TREE_TYPE (prevailing_decl
));
256 type
= TYPE_MAIN_VARIANT (TREE_TYPE (decl
));
258 if (!types_compatible_p (prevailing_type
, type
))
260 if (COMPLETE_TYPE_P (type
))
263 /* If type is incomplete then avoid warnings in the cases
264 that TBAA handles just fine. */
266 if (TREE_CODE (prevailing_type
) != TREE_CODE (type
))
269 if (TREE_CODE (prevailing_type
) == ARRAY_TYPE
)
271 tree tem1
= TREE_TYPE (prevailing_type
);
272 tree tem2
= TREE_TYPE (type
);
273 while (TREE_CODE (tem1
) == ARRAY_TYPE
274 && TREE_CODE (tem2
) == ARRAY_TYPE
)
276 tem1
= TREE_TYPE (tem1
);
277 tem2
= TREE_TYPE (tem2
);
280 if (TREE_CODE (tem1
) != TREE_CODE (tem2
))
283 if (!types_compatible_p (tem1
, tem2
))
287 /* Fallthru. Compatible enough. */
290 /* ??? We might want to emit a warning here if type qualification
291 differences were spotted. Do not do this unconditionally though. */
293 /* There is no point in comparing too many details of the decls here.
294 The type compatibility checks or the completing of types has properly
295 dealt with most issues. */
297 /* The following should all not invoke fatal errors as in non-LTO
298 mode the linker wouldn't complain either. Just emit warnings. */
300 /* Report a warning if user-specified alignments do not match. */
301 if ((DECL_USER_ALIGN (prevailing_decl
) && DECL_USER_ALIGN (decl
))
302 && DECL_ALIGN (prevailing_decl
) < DECL_ALIGN (decl
))
308 /* Return true if the symtab entry E can be replaced by another symtab
312 lto_symtab_resolve_replaceable_p (symtab_node
*e
)
314 if (DECL_EXTERNAL (e
->decl
)
315 || DECL_COMDAT (e
->decl
)
316 || DECL_ONE_ONLY (e
->decl
)
317 || DECL_WEAK (e
->decl
))
320 if (TREE_CODE (e
->decl
) == VAR_DECL
)
321 return (DECL_COMMON (e
->decl
)
322 || (!flag_no_common
&& !DECL_INITIAL (e
->decl
)));
327 /* Return true, if the symbol E should be resolved by lto-symtab.
328 Those are all external symbols and all real symbols that are not static (we
329 handle renaming of static later in partitioning). */
332 lto_symtab_symbol_p (symtab_node
*e
)
334 if (!TREE_PUBLIC (e
->decl
) && !DECL_EXTERNAL (e
->decl
))
336 return e
->real_symbol_p ();
339 /* Return true if the symtab entry E can be the prevailing one. */
342 lto_symtab_resolve_can_prevail_p (symtab_node
*e
)
344 if (!lto_symtab_symbol_p (e
))
347 /* The C++ frontend ends up neither setting TREE_STATIC nor
348 DECL_EXTERNAL on virtual methods but only TREE_PUBLIC.
349 So do not reject !TREE_STATIC here but only DECL_EXTERNAL. */
350 if (DECL_EXTERNAL (e
->decl
))
353 return e
->definition
;
356 /* Resolve the symbol with the candidates in the chain *SLOT and store
357 their resolutions. */
360 lto_symtab_resolve_symbols (symtab_node
*first
)
363 symtab_node
*prevailing
= NULL
;
365 /* Always set e->node so that edges are updated to reflect decl merging. */
366 for (e
= first
; e
; e
= e
->next_sharing_asm_name
)
367 if (lto_symtab_symbol_p (e
)
368 && (e
->resolution
== LDPR_PREVAILING_DEF_IRONLY
369 || e
->resolution
== LDPR_PREVAILING_DEF_IRONLY_EXP
370 || e
->resolution
== LDPR_PREVAILING_DEF
))
376 /* If the chain is already resolved there is nothing else to do. */
379 /* Assert it's the only one. */
380 for (e
= prevailing
->next_sharing_asm_name
; e
; e
= e
->next_sharing_asm_name
)
381 if (lto_symtab_symbol_p (e
)
382 && (e
->resolution
== LDPR_PREVAILING_DEF_IRONLY
383 || e
->resolution
== LDPR_PREVAILING_DEF_IRONLY_EXP
384 || e
->resolution
== LDPR_PREVAILING_DEF
))
385 fatal_error ("multiple prevailing defs for %qE",
386 DECL_NAME (prevailing
->decl
));
390 /* Find the single non-replaceable prevailing symbol and
391 diagnose ODR violations. */
392 for (e
= first
; e
; e
= e
->next_sharing_asm_name
)
394 if (!lto_symtab_resolve_can_prevail_p (e
))
397 /* If we have a non-replaceable definition it prevails. */
398 if (!lto_symtab_resolve_replaceable_p (e
))
402 error_at (DECL_SOURCE_LOCATION (e
->decl
),
403 "%qD has already been defined", e
->decl
);
404 inform (DECL_SOURCE_LOCATION (prevailing
->decl
),
405 "previously defined here");
413 /* Do a second round choosing one from the replaceable prevailing decls. */
414 for (e
= first
; e
; e
= e
->next_sharing_asm_name
)
416 if (!lto_symtab_resolve_can_prevail_p (e
))
419 /* Choose the first function that can prevail as prevailing. */
420 if (TREE_CODE (e
->decl
) == FUNCTION_DECL
)
426 /* From variables that can prevail choose the largest one. */
428 || tree_int_cst_lt (DECL_SIZE (prevailing
->decl
),
430 /* When variables are equivalent try to chose one that has useful
431 DECL_INITIAL. This makes sense for keyed vtables that are
432 DECL_EXTERNAL but initialized. In units that do not need them
433 we replace the initializer by error_mark_node to conserve
436 We know that the vtable is keyed outside the LTO unit - otherwise
437 the keyed instance would prevail. We still can preserve useful
438 info in the initializer. */
439 || (DECL_SIZE (prevailing
->decl
) == DECL_SIZE (e
->decl
)
440 && (DECL_INITIAL (e
->decl
)
441 && DECL_INITIAL (e
->decl
) != error_mark_node
)
442 && (!DECL_INITIAL (prevailing
->decl
)
443 || DECL_INITIAL (prevailing
->decl
) == error_mark_node
)))
450 /* Merge all decls in the symbol table chain to the prevailing decl and
451 issue diagnostics about type mismatches. If DIAGNOSED_P is true
452 do not issue further diagnostics.*/
455 lto_symtab_merge_decls_2 (symtab_node
*first
, bool diagnosed_p
)
457 symtab_node
*prevailing
;
459 vec
<tree
> mismatches
= vNULL
;
463 /* Nothing to do for a single entry. */
465 if (!prevailing
->next_sharing_asm_name
)
468 /* Try to merge each entry with the prevailing one. */
469 for (e
= prevailing
->next_sharing_asm_name
;
470 e
; e
= e
->next_sharing_asm_name
)
471 if (TREE_PUBLIC (e
->decl
))
473 if (!lto_symtab_merge (prevailing
, e
)
475 mismatches
.safe_push (e
->decl
);
477 if (mismatches
.is_empty ())
480 /* Diagnose all mismatched re-declarations. */
481 FOR_EACH_VEC_ELT (mismatches
, i
, decl
)
483 if (!types_compatible_p (TREE_TYPE (prevailing
->decl
),
485 diagnosed_p
|= warning_at (DECL_SOURCE_LOCATION (decl
), 0,
486 "type of %qD does not match original "
487 "declaration", decl
);
489 else if ((DECL_USER_ALIGN (prevailing
->decl
)
490 && DECL_USER_ALIGN (decl
))
491 && DECL_ALIGN (prevailing
->decl
) < DECL_ALIGN (decl
))
493 diagnosed_p
|= warning_at (DECL_SOURCE_LOCATION (decl
), 0,
494 "alignment of %qD is bigger than "
495 "original declaration", decl
);
499 inform (DECL_SOURCE_LOCATION (prevailing
->decl
),
500 "previously declared here");
502 mismatches
.release ();
505 /* Helper to process the decl chain for the symbol table entry *SLOT. */
508 lto_symtab_merge_decls_1 (symtab_node
*first
)
511 symtab_node
*prevailing
;
512 bool diagnosed_p
= false;
514 if (symtab
->dump_file
)
516 fprintf (symtab
->dump_file
, "Merging nodes for %s. Candidates:\n",
518 for (e
= first
; e
; e
= e
->next_sharing_asm_name
)
519 if (TREE_PUBLIC (e
->decl
))
520 e
->dump (symtab
->dump_file
);
523 /* Compute the symbol resolutions. This is a no-op when using the
524 linker plugin and resolution was decided by the linker. */
525 prevailing
= lto_symtab_resolve_symbols (first
);
527 /* If there's not a prevailing symbol yet it's an external reference.
528 Happens a lot during ltrans. Choose the first symbol with a
529 cgraph or a varpool node. */
532 for (prevailing
= first
;
533 prevailing
; prevailing
= prevailing
->next_sharing_asm_name
)
534 if (lto_symtab_symbol_p (prevailing
))
538 /* For variables chose with a priority variant with vnode
539 attached (i.e. from unit where external declaration of
540 variable is actually used).
541 When there are multiple variants, chose one with size.
542 This is needed for C++ typeinfos, for example in
543 lto/20081204-1 there are typeifos in both units, just
544 one of them do have size. */
545 if (TREE_CODE (prevailing
->decl
) == VAR_DECL
)
547 for (e
= prevailing
->next_sharing_asm_name
;
548 e
; e
= e
->next_sharing_asm_name
)
549 if (!COMPLETE_TYPE_P (TREE_TYPE (prevailing
->decl
))
550 && COMPLETE_TYPE_P (TREE_TYPE (e
->decl
))
551 && lto_symtab_symbol_p (e
))
554 /* For variables prefer the non-builtin if one is available. */
555 else if (TREE_CODE (prevailing
->decl
) == FUNCTION_DECL
)
557 for (e
= first
; e
; e
= e
->next_sharing_asm_name
)
558 if (TREE_CODE (e
->decl
) == FUNCTION_DECL
559 && !DECL_BUILT_IN (e
->decl
)
560 && lto_symtab_symbol_p (e
))
568 symtab
->symtab_prevail_in_asm_name_hash (prevailing
);
570 /* Diagnose mismatched objects. */
571 for (e
= prevailing
->next_sharing_asm_name
;
572 e
; e
= e
->next_sharing_asm_name
)
574 if (TREE_CODE (prevailing
->decl
)
575 == TREE_CODE (e
->decl
))
577 if (!lto_symtab_symbol_p (e
))
580 switch (TREE_CODE (prevailing
->decl
))
583 gcc_assert (TREE_CODE (e
->decl
) == FUNCTION_DECL
);
584 error_at (DECL_SOURCE_LOCATION (e
->decl
),
585 "variable %qD redeclared as function",
590 gcc_assert (TREE_CODE (e
->decl
) == VAR_DECL
);
591 error_at (DECL_SOURCE_LOCATION (e
->decl
),
592 "function %qD redeclared as variable",
603 inform (DECL_SOURCE_LOCATION (prevailing
->decl
),
604 "previously declared here");
606 /* Merge the chain to the single prevailing decl and diagnose
608 lto_symtab_merge_decls_2 (prevailing
, diagnosed_p
);
610 if (symtab
->dump_file
)
612 fprintf (symtab
->dump_file
, "After resolution:\n");
613 for (e
= prevailing
; e
; e
= e
->next_sharing_asm_name
)
614 e
->dump (symtab
->dump_file
);
618 /* Resolve and merge all symbol table chains to a prevailing decl. */
621 lto_symtab_merge_decls (void)
625 /* Populate assembler name hash. */
626 symtab
->symtab_initialize_asm_name_hash ();
628 FOR_EACH_SYMBOL (node
)
629 if (!node
->previous_sharing_asm_name
630 && node
->next_sharing_asm_name
)
631 lto_symtab_merge_decls_1 (node
);
634 /* Helper to process the decl chain for the symbol table entry *SLOT. */
637 lto_symtab_merge_symbols_1 (symtab_node
*prevailing
)
642 /* Replace the cgraph node of each entry with the prevailing one. */
643 for (e
= prevailing
->next_sharing_asm_name
; e
;
646 next
= e
->next_sharing_asm_name
;
648 if (!lto_symtab_symbol_p (e
))
650 cgraph_node
*ce
= dyn_cast
<cgraph_node
*> (e
);
651 if (ce
&& !DECL_BUILT_IN (e
->decl
))
652 lto_cgraph_replace_node (ce
, dyn_cast
<cgraph_node
*> (prevailing
));
653 if (varpool_node
*ve
= dyn_cast
<varpool_node
*> (e
))
654 lto_varpool_replace_node (ve
, dyn_cast
<varpool_node
*> (prevailing
));
660 /* Merge cgraph nodes according to the symbol merging done by
661 lto_symtab_merge_decls. */
664 lto_symtab_merge_symbols (void)
670 symtab
->symtab_initialize_asm_name_hash ();
672 /* Do the actual merging.
673 At this point we invalidate hash translating decls into symtab nodes
674 because after removing one of duplicate decls the hash is not correcly
675 updated to the ohter dupliate. */
676 FOR_EACH_SYMBOL (node
)
677 if (lto_symtab_symbol_p (node
)
678 && node
->next_sharing_asm_name
679 && !node
->previous_sharing_asm_name
)
680 lto_symtab_merge_symbols_1 (node
);
682 /* Resolve weakref aliases whose target are now in the compilation unit.
683 also re-populate the hash translating decls into symtab nodes*/
684 FOR_EACH_SYMBOL (node
)
686 cgraph_node
*cnode
, *cnode2
;
690 if (!node
->analyzed
&& node
->alias_target
)
692 symtab_node
*tgt
= symtab_node::get_for_asmname (node
->alias_target
);
693 gcc_assert (node
->weakref
);
695 node
->resolve_alias (tgt
);
699 if (!(cnode
= dyn_cast
<cgraph_node
*> (node
))
701 || cnode
->clone_of
->decl
!= cnode
->decl
)
703 /* Builtins are not merged via decl merging. It is however
704 possible that tree merging unified the declaration. We
705 do not want duplicate entries in symbol table. */
706 if (cnode
&& DECL_BUILT_IN (node
->decl
)
707 && (cnode2
= cgraph_node::get (node
->decl
))
709 lto_cgraph_replace_node (cnode2
, cnode
);
711 /* The user defined assembler variables are also not unified by their
712 symbol name (since it is irrelevant), but we need to unify symbol
713 nodes if tree merging occured. */
714 if ((vnode
= dyn_cast
<varpool_node
*> (node
))
715 && DECL_HARD_REGISTER (vnode
->decl
)
716 && (node2
= symtab_node::get (vnode
->decl
))
718 lto_varpool_replace_node (dyn_cast
<varpool_node
*> (node2
),
722 /* Abstract functions may have duplicated cgraph nodes attached;
724 else if (cnode
&& DECL_ABSTRACT_P (cnode
->decl
)
725 && (cnode2
= cgraph_node::get (node
->decl
))
729 node
->decl
->decl_with_vis
.symtab_node
= node
;
735 /* Given the decl DECL, return the prevailing decl with the same name. */
738 lto_symtab_prevailing_decl (tree decl
)
742 /* Builtins and local symbols are their own prevailing decl. */
743 if ((!TREE_PUBLIC (decl
) && !DECL_EXTERNAL (decl
)) || is_builtin_fn (decl
))
746 /* DECL_ABSTRACT_Ps are their own prevailing decl. */
747 if (TREE_CODE (decl
) == FUNCTION_DECL
&& DECL_ABSTRACT_P (decl
))
750 /* Likewise builtins are their own prevailing decl. This preserves
751 non-builtin vs. builtin uses from compile-time. */
752 if (TREE_CODE (decl
) == FUNCTION_DECL
&& DECL_BUILT_IN (decl
))
755 /* Ensure DECL_ASSEMBLER_NAME will not set assembler name. */
756 gcc_assert (DECL_ASSEMBLER_NAME_SET_P (decl
));
758 /* Walk through the list of candidates and return the one we merged to. */
759 ret
= symtab_node::get_for_asmname (DECL_ASSEMBLER_NAME (decl
));