This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR58300, issue with -fvtable-verify=preinit

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

2013-09-04  Caroline Tice  <>

        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.

Attachment: bug-58300.patch
Description: Binary data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]