]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cgraphunit.c
Don't mark IFUNC resolver as only called directly
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 May 2018 19:10:34 +0000 (19:10 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 May 2018 19:10:34 +0000 (19:10 +0000)
commitb859b598b18a42711327ff0063aae10da84abefb
treef88364764fd0a5dbf2703b09f278a52dcaaddaef
parentbc3998acfd73c3c643803aff6f6bbe60c7929a70
Don't mark IFUNC resolver as only called directly

Since IFUNC resolver is called indirectly, don't mark IFUNC resolver as
only called directly.  This patch adds ifunc_resolver to cgraph_node,
sets ifunc_resolver for ifunc attribute and checks ifunc_resolver
instead of looking up ifunc attribute.

gcc/

PR target/85345
* cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
attribute.
(cgraph_node::create_alias): Likewise.
(cgraph_node::get_availability): Check ifunc_resolver instead
of looking up ifunc attribute.
* cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
* varasm.c (do_assemble_alias): Likewise.
(assemble_alias): Likewise.
(default_binds_local_p_3): Likewise.
* cgraph.h (cgraph_node): Add ifunc_resolver.
(cgraph_node::only_called_directly_or_aliased_p): Return false
for IFUNC resolver.
* lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
attribute.
* symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
(symtab_node::binds_to_current_def_p): Check ifunc_resolver
instead of looking up ifunc attribute.

gcc/testsuite/

PR target/85345
* gcc.target/i386/pr85345.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@260547 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/cgraph.c
gcc/cgraph.h
gcc/cgraphunit.c
gcc/lto-cgraph.c
gcc/symtab.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr85345.c [new file with mode: 0644]
gcc/varasm.c