aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2013-08-31 15:47:20 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2013-08-31 13:47:20 +0000
commit5e5812126c454414459a8f9fa46b7ff3032c8c53 (patch)
tree0b6aa3ca927f90f796fadadf97fd76f1e2d242e1 /gcc/tree-cfg.c
parent4843f03206f7ee188c5f7368ec6e64da7e90a396 (diff)
downloadgcc-5e5812126c454414459a8f9fa46b7ff3032c8c53.zip
gcc-5e5812126c454414459a8f9fa46b7ff3032c8c53.tar.gz
gcc-5e5812126c454414459a8f9fa46b7ff3032c8c53.tar.bz2
cgraph.c (cgraph_get_body): Update call of lto_input_function_body.
* cgraph.c (cgraph_get_body): Update call of lto_input_function_body. * gimple-streamer-in.c (input_gimple_stmt): Move sanity check to ... * tree-cfg.c (verify_gimple_label): ... here. * ipa-utils.c: Include lto-streamer.h, ipa-inline.h (ipa_merge_profiles): New function. * lto-streamer-in.c (lto_read_body): Take node instead of fn_decl. (lto_input_function_body): Likewise. * ipa-utils.h (ipa_merge_profiles): Declare. * lto-streamer.h (lto_input_function_body): Update prototype. (emit_label_in_global_context_p): Remove. * lto-symtab.c: Include ipa-utils.h (lto_cgraph_replace_node): Use ipa_merge_profiles. From-SVN: r202131
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index af8685c..bc1e1ba 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -4252,6 +4252,12 @@ verify_gimple_label (gimple stmt)
if (TREE_CODE (decl) != LABEL_DECL)
return true;
+ if (!DECL_NONLOCAL (decl) && !FORCED_LABEL (decl)
+ && DECL_CONTEXT (decl) != current_function_decl)
+ {
+ error ("label's context is not the current function decl");
+ err |= true;
+ }
uid = LABEL_DECL_UID (decl);
if (cfun->cfg