diff options
author | Caroline Tice <cmtice@google.com> | 2013-09-08 14:58:07 -0700 |
---|---|---|
committer | Caroline Tice <ctice@gcc.gnu.org> | 2013-09-08 14:58:07 -0700 |
commit | f085f27e124563b5cbede337426695c4ed43693b (patch) | |
tree | 1ceaae2103d7fc8be5800b25735bb38bf0eb3d2b /gcc/cp/vtable-class-hierarchy.c | |
parent | 7b395dddb5c4c14bf5f9f9e75a60f2b549d193ff (diff) | |
download | gcc-f085f27e124563b5cbede337426695c4ed43693b.tar.gz |
Fix PR 58300...
Fix PR 58300: Re-order events with -fvtable-verify=preinit
flag, so constructor init function is not written to assembly
file until after call to cgraph_process_new_functions.
From-SVN: r202371
Diffstat (limited to 'gcc/cp/vtable-class-hierarchy.c')
-rw-r--r-- | gcc/cp/vtable-class-hierarchy.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/cp/vtable-class-hierarchy.c b/gcc/cp/vtable-class-hierarchy.c index 276fa1f9966..78611a83264 100644 --- a/gcc/cp/vtable-class-hierarchy.c +++ b/gcc/cp/vtable-class-hierarchy.c @@ -1179,15 +1179,16 @@ vtv_generate_init_routine (void) TREE_USED (vtv_fndecl) = 1; DECL_PRESERVE_P (vtv_fndecl) = 1; if (flag_vtable_verify == VTV_PREINIT_PRIORITY) - { - DECL_STATIC_CONSTRUCTOR (vtv_fndecl) = 0; - assemble_vtv_preinit_initializer (vtv_fndecl); - } + DECL_STATIC_CONSTRUCTOR (vtv_fndecl) = 0; gimplify_function_tree (vtv_fndecl); cgraph_add_new_function (vtv_fndecl, false); cgraph_process_new_functions (); + + if (flag_vtable_verify == VTV_PREINIT_PRIORITY) + assemble_vtv_preinit_initializer (vtv_fndecl); + } pop_lang_context (); } |