ipa-comdats.c (propagate_comdat_group): Walk through thunks.
gcc/ * ipa-comdats.c (propagate_comdat_group): Walk through thunks. gcc/testsuite/ * gcc.target/i386/mpx/chkp-thunk-comdat-3.c: New. From-SVN: r221919
This commit is contained in:
parent
47eec99462
commit
930ee1165d
4 changed files with 37 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
|||
2015-04-08 Ilya Enkovich <ilya.enkovich@intel.com>
|
||||
|
||||
* ipa-comdats.c (propagate_comdat_group): Walk through thunks.
|
||||
|
||||
2015-04-08 Gerald Pfeifer <gerald@pfeifer.com>
|
||||
|
||||
* doc/install.texi (bootstrap-lto-noplugin): Rewrite.
|
||||
|
|
|
@ -142,12 +142,14 @@ propagate_comdat_group (struct symtab_node *symbol,
|
|||
{
|
||||
struct symtab_node *symbol2 = edge->caller;
|
||||
|
||||
/* If we see inline clone, its comdat group actually
|
||||
corresponds to the comdat group of the function it is inlined
|
||||
to. */
|
||||
|
||||
if (cgraph_node * cn = dyn_cast <cgraph_node *> (symbol2))
|
||||
{
|
||||
/* Thunks can not call across section boundary. */
|
||||
if (cn->thunk.thunk_p)
|
||||
newgroup = propagate_comdat_group (symbol2, newgroup, map);
|
||||
/* If we see inline clone, its comdat group actually
|
||||
corresponds to the comdat group of the function it
|
||||
is inlined to. */
|
||||
if (cn->global.inlined_to)
|
||||
symbol2 = cn->global.inlined_to;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2015-04-08 Ilya Enkovich <ilya.enkovich@intel.com>
|
||||
|
||||
* gcc.target/i386/mpx/chkp-thunk-comdat-3.c: New.
|
||||
|
||||
2015-04-08 Ilya Enkovich <ilya.enkovich@intel.com>
|
||||
|
||||
* gcc/testsuite/gcc.target/i386/thunk-retbnd.c: New.
|
||||
|
|
23
gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-3.c
Normal file
23
gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-3.c
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-fcheck-pointer-bounds -mmpx -O -fvisibility=hidden" } */
|
||||
|
||||
int val;
|
||||
|
||||
static int __attribute__((noinline))
|
||||
test1 ()
|
||||
{
|
||||
return val;
|
||||
}
|
||||
|
||||
static int __attribute__((bnd_legacy,noinline))
|
||||
test2 ()
|
||||
{
|
||||
return test1 ();
|
||||
}
|
||||
|
||||
int
|
||||
test3 (void)
|
||||
{
|
||||
return test2 ();
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue