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
This commit is contained in:
Caroline Tice 2013-09-08 14:58:07 -07:00 committed by Caroline Tice
parent 7b395dddb5
commit f085f27e12
2 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,10 @@
2013-09-08 Caroline Tice <cmtice@google.com>
PR c++/58300
* vtable-class-hierarchy.c (vtv_generate_init_routine): In
preinit case, move call to assemble_vtv_preinit_initializer to
after call to cgraph_process_new_functions.
2013-09-08 Tom de Vries <tom@codesourcery.com>
PR c++/58282

View File

@ -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 ();
}