From: Richard Biener Date: Thu, 21 Jul 2016 12:25:00 +0000 (+0000) Subject: function-tests.c (build_trivial_generic_function): Set BLOCK_SUPERCONTEXT of DECL_INI... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=01771d4361d3fc7e89e292db5f15aa11783e7ec7;p=gcc.git function-tests.c (build_trivial_generic_function): Set BLOCK_SUPERCONTEXT of DECL_INITIAL. 2016-07-21 Richard Biener * function-tests.c (build_trivial_generic_function): Set BLOCK_SUPERCONTEXT of DECL_INITIAL. * omp-low.c (create_omp_child_function): Likewise. (grid_expand_target_grid_body): Likewise. * cgraphunit.c (init_lowered_empty_function): Likewise. (cgraph_node::expand_thunk): Likewise. * tree-parloops.c (create_loop_fn): Likewise. * ipa.c (cgraph_build_static_cdtor_1): Likewise. cp/ * vtable-class-hierarchy.c (vtv_generate_init_routine): Set DECL_IGNORED_P. java/ * jcf-parse.c (java_emit_static_constructor): Set BLOCK_SUPERCONTEXT of DECL_INITIAL. From-SVN: r238589 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 53ca8c2cb65..6c79b12354e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2016-07-21 Richard Biener + + * function-tests.c (build_trivial_generic_function): Set + BLOCK_SUPERCONTEXT of DECL_INITIAL. + * omp-low.c (create_omp_child_function): Likewise. + (grid_expand_target_grid_body): Likewise. + * cgraphunit.c (init_lowered_empty_function): Likewise. + (cgraph_node::expand_thunk): Likewise. + * tree-parloops.c (create_loop_fn): Likewise. + * ipa.c (cgraph_build_static_cdtor_1): Likewise. + 2016-07-21 Prathamesh Kulkarni * tree-ssa-strlen.c (strlen_dom_walker::before_dom_children): Fix typo diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index e30fe6e423b..d8f79036b40 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -1438,6 +1438,7 @@ init_lowered_empty_function (tree decl, bool in_ssa, gcov_type count) } DECL_INITIAL (decl) = make_node (BLOCK); + BLOCK_SUPERCONTEXT (DECL_INITIAL (decl)) = decl; DECL_SAVED_TREE (decl) = error_mark_node; cfun->curr_properties |= (PROP_gimple_lcf | PROP_gimple_leh | PROP_gimple_any @@ -1627,6 +1628,7 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk) fn_block = make_node (BLOCK); BLOCK_VARS (fn_block) = a; DECL_INITIAL (thunk_fndecl) = fn_block; + BLOCK_SUPERCONTEXT (fn_block) = thunk_fndecl; allocate_struct_function (thunk_fndecl, false); init_function_start (thunk_fndecl); cfun->is_thunk = 1; diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 30a0b44c121..e7f5cb0dfbd 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2016-07-21 Richard Biener + + * vtable-class-hierarchy.c (vtv_generate_init_routine): Set + DECL_IGNORED_P. + 2016-07-21 Jakub Jelinek PR c++/71941 diff --git a/gcc/cp/vtable-class-hierarchy.c b/gcc/cp/vtable-class-hierarchy.c index a3a49b6d566..8c5f4c203a4 100644 --- a/gcc/cp/vtable-class-hierarchy.c +++ b/gcc/cp/vtable-class-hierarchy.c @@ -1182,6 +1182,9 @@ vtv_generate_init_routine (void) TREE_STATIC (vtv_fndecl) = 1; TREE_USED (vtv_fndecl) = 1; DECL_PRESERVE_P (vtv_fndecl) = 1; + /* We are running too late to generate any meaningful debug information + for this routine. */ + DECL_IGNORED_P (vtv_fndecl) = 1; if (flag_vtable_verify == VTV_PREINIT_PRIORITY && !TARGET_PECOFF) DECL_STATIC_CONSTRUCTOR (vtv_fndecl) = 0; diff --git a/gcc/function-tests.c b/gcc/function-tests.c index a59a066448b..4152cd386d5 100644 --- a/gcc/function-tests.c +++ b/gcc/function-tests.c @@ -249,6 +249,7 @@ build_trivial_generic_function () tsi_link_after (&stmt_iter, return_stmt, TSI_CONTINUE_LINKING); DECL_INITIAL (fndecl) = block; + BLOCK_SUPERCONTEXT (block) = fndecl; /* how to add to function? the following appears to be how to set the body of a fndecl: */ diff --git a/gcc/ipa.c b/gcc/ipa.c index 2609e327fd2..6f4693fd59a 100644 --- a/gcc/ipa.c +++ b/gcc/ipa.c @@ -935,6 +935,7 @@ cgraph_build_static_cdtor_1 (char which, tree body, int priority, bool final) DECL_UNINLINABLE (decl) = 1; DECL_INITIAL (decl) = make_node (BLOCK); + BLOCK_SUPERCONTEXT (DECL_INITIAL (decl)) = decl; TREE_USED (DECL_INITIAL (decl)) = 1; DECL_SOURCE_LOCATION (decl) = input_location; diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 58e40a6c133..874466a7f0a 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2016-07-21 Richard Biener + + * jcf-parse.c (java_emit_static_constructor): Set + BLOCK_SUPERCONTEXT of DECL_INITIAL. + 2016-05-31 Roger Sayle * builtins.c (java_builtins): Use popcount* and bswap* builtins to diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index dd3ad3f34b8..ed3e32f9788 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -1719,6 +1719,7 @@ java_emit_static_constructor (void) DECL_UNINLINABLE (decl) = 1; DECL_INITIAL (decl) = make_node (BLOCK); + BLOCK_SUPERCONTEXT (DECL_INITIAL (decl)) = decl; TREE_USED (DECL_INITIAL (decl)) = 1; DECL_STATIC_CONSTRUCTOR (decl) = 1; diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 04509f39938..c75452c81c8 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -2472,6 +2472,7 @@ create_omp_child_function (omp_context *ctx, bool task_copy) DECL_EXTERNAL (decl) = 0; DECL_CONTEXT (decl) = NULL_TREE; DECL_INITIAL (decl) = make_node (BLOCK); + BLOCK_SUPERCONTEXT (DECL_INITIAL (decl)) = decl; if (cgraph_node::get (current_function_decl)->offloadable) cgraph_node::get_create (decl)->offloadable = 1; else @@ -13670,6 +13671,7 @@ grid_expand_target_grid_body (struct omp_region *target) BLOCK_ABSTRACT_ORIGIN (fniniblock) = tgtblock; BLOCK_SOURCE_LOCATION (fniniblock) = BLOCK_SOURCE_LOCATION (tgtblock); BLOCK_SOURCE_END_LOCATION (fniniblock) = BLOCK_SOURCE_END_LOCATION (tgtblock); + BLOCK_SUPERCONTEXT (fniniblock) = kern_fndecl; DECL_INITIAL (kern_fndecl) = fniniblock; push_struct_function (kern_fndecl); cfun->function_end_locus = gimple_location (tgt_stmt); diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c index 1303ffc7d08..a16015271a1 100644 --- a/gcc/tree-parloops.c +++ b/gcc/tree-parloops.c @@ -1476,6 +1476,7 @@ create_loop_fn (location_t loc) DECL_EXTERNAL (decl) = 0; DECL_CONTEXT (decl) = NULL_TREE; DECL_INITIAL (decl) = make_node (BLOCK); + BLOCK_SUPERCONTEXT (DECL_INITIAL (decl)) = decl; t = build_decl (loc, RESULT_DECL, NULL_TREE, void_type_node); DECL_ARTIFICIAL (t) = 1;