gcc/ * ipa.c (symbol_table::remove_unreachable_nodes): Don't remove instumentation thunks calling reachable functions. * lto-cgraph.c (output_refs): Always output IPA_REF_CHKP. * lto/lto-partition.c (privatize_symbol_name_1): New. (privatize_symbol_name): Privatize both decl and orig_decl names for instrumented functions. * cgraph.c (cgraph_node::verify_node): Add transparent alias chain check for instrumented node. gcc/testsuite/ * gcc.dg/lto/chkp-privatize-1_0.c: New. * gcc.dg/lto/chkp-privatize-1_1.c: New. * gcc.dg/lto/chkp-privatize-2_0.c: New. * gcc.dg/lto/chkp-privatize-2_1.c: New. From-SVN: r224063
19 lines
322 B
C
19 lines
322 B
C
/* { dg-lto-do link } */
|
|
/* { dg-require-effective-target mpx } */
|
|
/* { dg-lto-options { { -Ofast -flto -fcheck-pointer-bounds -mmpx } } } */
|
|
|
|
static int
|
|
__attribute__ ((noinline))
|
|
func1 (int i)
|
|
{
|
|
return i + 2;
|
|
}
|
|
|
|
extern int func2 (int i);
|
|
|
|
int
|
|
main (int argc, char **argv)
|
|
{
|
|
return func1 (argc) + func2 (argc) + 1;
|
|
}
|