This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix scope tree for versioned functions
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 25 Feb 2011 16:59:39 +0100 (CET)
- Subject: [PATCH] Fix scope tree for versioned functions
I'm testing this separately currently and will apply if it succeeds.
Otherwise we'll end up with BLOCKs w/o a supercontext.
Richard.
2011-02-25 Richard Guenther <rguenther@suse.de>
* tree-inline.c (tree_function_versioning): Set BLOCK_SUPERCONTEXT
of the copied scope tree.
Index: gcc/tree-inline.c
===================================================================
*** gcc/tree-inline.c (revision 170492)
--- gcc/tree-inline.c (working copy)
*************** tree_function_versioning (tree old_decl,
*** 5156,5161 ****
--- 5156,5162 ----
args_to_skip, &vars);
DECL_INITIAL (new_decl) = remap_blocks (DECL_INITIAL (id.src_fn), &id);
+ BLOCK_SUPERCONTEXT (DECL_INITIAL (new_decl)) = new_decl;
declare_inline_vars (DECL_INITIAL (new_decl), vars);