aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorIlya Enkovich <ilya.enkovich@intel.com>2015-06-03 08:29:28 +0000
committerIlya Enkovich <ienkovich@gcc.gnu.org>2015-06-03 08:29:28 +0000
commit48de5d37c34a0d18b4f0e19e9ab3f661586ae9ee (patch)
tree2937d0650a54355694d28bd857d54e78bcd1f876 /gcc/cgraph.c
parentb2858c9f3ed8275a61ee02421b8fc51ab070c79e (diff)
downloadgcc-48de5d37c34a0d18b4f0e19e9ab3f661586ae9ee.zip
gcc-48de5d37c34a0d18b4f0e19e9ab3f661586ae9ee.tar.gz
gcc-48de5d37c34a0d18b4f0e19e9ab3f661586ae9ee.tar.bz2
ipa.c (symbol_table::remove_unreachable_nodes): Don't remove instumentation thunks calling reachable functions.
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
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 2ded5af..039ce15 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -3036,6 +3036,20 @@ cgraph_node::verify_node (void)
}
}
+ if (instrumentation_clone
+ && DECL_BUILT_IN_CLASS (decl) == NOT_BUILT_IN)
+ {
+ tree name = DECL_ASSEMBLER_NAME (decl);
+ tree orig_name = DECL_ASSEMBLER_NAME (orig_decl);
+
+ if (!IDENTIFIER_TRANSPARENT_ALIAS (name)
+ || TREE_CHAIN (name) != orig_name)
+ {
+ error ("Alias chain for instrumented node is broken");
+ error_found = true;
+ }
+ }
+
if (analyzed && thunk.thunk_p)
{
if (!callees)