diff options
author | bviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-07 16:42:49 +0000 |
---|---|---|
committer | bviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-07 16:42:49 +0000 |
commit | 5391d40fb4321a779e2a0fcb7353b421a20121ba (patch) | |
tree | 270c2cd1491c40f8ae4b82d95b25b0e914a1f0a8 /gcc/lto-symtab.c | |
parent | a94856bbd406ecad873946beeeeabec5db7eb7ac (diff) | |
download | gcc-5391d40fb4321a779e2a0fcb7353b421a20121ba.tar.gz |
Merged with trunk at revision 194958.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/cilkplus@194982 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-symtab.c')
-rw-r--r-- | gcc/lto-symtab.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/lto-symtab.c b/gcc/lto-symtab.c index 295fd37aa38..b6ff02807de 100644 --- a/gcc/lto-symtab.c +++ b/gcc/lto-symtab.c @@ -439,6 +439,16 @@ lto_symtab_merge_decls_1 (symtab_node first) && COMPLETE_TYPE_P (TREE_TYPE (e->symbol.decl))) prevailing = e; } + /* For variables prefer the builtin if one is available. */ + else if (TREE_CODE (prevailing->symbol.decl) == FUNCTION_DECL) + { + for (e = first; e; e = e->symbol.next_sharing_asm_name) + if (DECL_BUILT_IN (e->symbol.decl)) + { + prevailing = e; + break; + } + } } symtab_prevail_in_asm_name_hash (prevailing); |