Add to same comdate group only if set (PR middle-end/90899)

2019-07-03  Martin Liska  <mliska@suse.cz>

	PR middle-end/90899
	* multiple_target.c (create_dispatcher_calls): Add to comdat
	group only if set for ifunc.
2019-07-03  Martin Liska  <mliska@suse.cz>

	PR middle-end/90899
	* gcc.target/i386/pr90899.c: New test.

From-SVN: r272992
This commit is contained in:
Martin Liska 2019-07-03 10:31:35 +02:00 committed by Martin Liska
parent 22dfc3e89d
commit d04295d243
4 changed files with 19 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2019-07-03 Martin Liska <mliska@suse.cz>
PR middle-end/90899
* multiple_target.c (create_dispatcher_calls): Add to comdat
group only if set for ifunc.
2019-07-03 Martin Liska <mliska@suse.cz>
PR target/88056

View File

@ -158,7 +158,8 @@ create_dispatcher_calls (struct cgraph_node *node)
{
symtab_node *source = ref->referring;
source->create_reference (inode, IPA_REF_ALIAS);
source->add_to_same_comdat_group (inode);
if (inode->get_comdat_group ())
source->add_to_same_comdat_group (inode);
}
else
gcc_unreachable ();

View File

@ -1,3 +1,8 @@
2019-07-03 Martin Liska <mliska@suse.cz>
PR middle-end/90899
* gcc.target/i386/pr90899.c: New test.
2019-07-03 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/91033

View File

@ -0,0 +1,6 @@
/* PR middle-end/90899 */
/* { dg-do compile } */
/* { dg-require-ifunc "" } */
__attribute__ ((target_clones ("default", "arch=slm"))) static int f () { return 0; }
__attribute__ ((alias ("f"))) __typeof (f) g;