Commit a9a98049 by Martin Liska Committed by Martin Liska

Properly redirect alias for MVC (PR ipa/84722).

2018-03-16  Martin Liska  <mliska@suse.cz>

	PR ipa/84722
	* multiple_target.c (create_dispatcher_calls): Redirect also
	an alias.
2018-03-16  Martin Liska  <mliska@suse.cz>

	PR ipa/84722
	* gcc.target/i386/mvc10.c: New test.

From-SVN: r258595
parent a8149569
2018-03-16 Martin Liska <mliska@suse.cz>
PR ipa/84722
* multiple_target.c (create_dispatcher_calls): Redirect also
an alias.
2018-03-16 Jakub Jelinek <jakub@redhat.com> 2018-03-16 Jakub Jelinek <jakub@redhat.com>
PR c++/79937 PR c++/79937
......
...@@ -145,6 +145,13 @@ create_dispatcher_calls (struct cgraph_node *node) ...@@ -145,6 +145,13 @@ create_dispatcher_calls (struct cgraph_node *node)
walk_gimple_stmt (&it, NULL, replace_function_decl, &wi); walk_gimple_stmt (&it, NULL, replace_function_decl, &wi);
} }
} }
else if (ref->use == IPA_REF_ALIAS)
{
symtab_node *source = ref->referring;
ref->remove_reference ();
source->create_reference (inode, IPA_REF_ALIAS);
source->add_to_same_comdat_group (inode);
}
else else
gcc_unreachable (); gcc_unreachable ();
} }
......
2018-03-16 Martin Liska <mliska@suse.cz>
PR ipa/84722
* gcc.target/i386/mvc10.c: New test.
2018-03-16 Jakub Jelinek <jakub@redhat.com> 2018-03-16 Jakub Jelinek <jakub@redhat.com>
PR c++/79937 PR c++/79937
......
/* PR ipa/84722. */
/* { dg-do run } */
/* { dg-require-ifunc "" } */
__attribute__ ((target_clones ("avx", "arch=core-avx2", "default"))) int
foo (int i)
{
return i - 1;
}
int weaks (int i) __attribute__ ((weak, alias ("foo")));
int
main (int argc, char **argv)
{
return weaks (argc);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment