------- Additional Comments From jakub at gcc dot gnu dot org 2005-04-17 21:28 ------- On HEAD this doesn't fail any longer because of the: * final.c (output_addr_const): Do not call mark_referenced. change (part of tree profiling branch merge).
I don't think you can construct a C testcase for this, as soon as you save some function's address into some reachable variable or take it in some reachable function, cgraph will know about it. The OBJ_TYPE_REF is special in that there is no such variable in the current translation unit and cp_fold_obj_type_ref just knows what is in the variable (vtable) in some other translation unit and optimizes that access. Of course we can I'm ATM testing 2 different patches, will attach them here once the testing finishes. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20991