This fixes a bug where using -fvtable-verify=preinit sometimes causes an ICE. In particular, when the preinit flag was used, the vtable verification constructor initialization function was being written to the assembly file before it was being checked with cgraph_process_new_functions. This sometimes caused an assertion failure in decide_is_symbol_needed. This patch fixes the problem by reordering events so that the function is written to the assembly file after the call to cgraph_process_new_functions. I have verified that this fixes the test case attached to the bug, and it has passed all my regular vtable verification tests. Is this patch ok to commit?
-- Caroline Tice cmt...@google.com 2013-09-04 Caroline Tice <cmt...@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.
bug-58300.patch
Description: Binary data