Redirect reference in the symbol table (PR ipa/84833).
2018-03-16 Martin Liska <mliska@suse.cz> PR ipa/84833 * multiple_target.c (create_dispatcher_calls): Redirect reference in the symbol table. 2018-03-16 Martin Liska <mliska@suse.cz> PR ipa/84833 * gcc.target/i386/mvc11.c: New test. From-SVN: r258596
This commit is contained in:
parent
a9a9804984
commit
d5aabfc9a6
|
@ -1,3 +1,9 @@
|
|||
2018-03-16 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR ipa/84833
|
||||
* multiple_target.c (create_dispatcher_calls): Redirect
|
||||
reference in the symbol table.
|
||||
|
||||
2018-03-16 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR ipa/84722
|
||||
|
|
|
@ -144,6 +144,10 @@ create_dispatcher_calls (struct cgraph_node *node)
|
|||
if (ref->referring->decl != resolver_decl)
|
||||
walk_gimple_stmt (&it, NULL, replace_function_decl, &wi);
|
||||
}
|
||||
|
||||
symtab_node *source = ref->referring;
|
||||
ref->remove_reference ();
|
||||
source->create_reference (inode, IPA_REF_ADDR);
|
||||
}
|
||||
else if (ref->use == IPA_REF_ALIAS)
|
||||
{
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2018-03-16 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR ipa/84833
|
||||
* gcc.target/i386/mvc11.c: New test.
|
||||
|
||||
2018-03-16 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR ipa/84722
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
/* { dg-do run } */
|
||||
/* { dg-require-ifunc "" } */
|
||||
/* { dg-options "-std=gnu99" } */
|
||||
|
||||
__attribute__((noipa)) int
|
||||
baz (int (*fn) (void))
|
||||
{
|
||||
asm volatile ("" : "+g" (fn) : : "memory");
|
||||
return fn ();
|
||||
}
|
||||
|
||||
__attribute__((target_clones("arch=sandybridge", "default"))) static int
|
||||
bar (void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
__attribute__((target_clones("arch=sandybridge", "default"))) int
|
||||
foo (void)
|
||||
{
|
||||
baz (bar) - 1;
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
foo ();
|
||||
}
|
Loading…
Reference in New Issue