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