From 2e9bb6ba99ec7db9f88a44dfec42c84ec1c7ea30 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sun, 17 Apr 2011 18:37:07 +0200 Subject: re PR middle-end/20991 (ICE in cgraph_mark_reachable_node) * cgraph.c (cgraph_clone_node): Do not handle vtable_method * cgraph.h (struct cgraph_local_info): Drop vtable_method. * cgraphunit.c (cgraph_copy_node_for_versioning): Drop vtable_method. * lto-cgraph.c (lto_output_node, input_overwrite_node): Drop vtable method. * gimple-fold.c (can_refer_decl_in_current_unit_p): Mention PR20991 in gimple-fold.c * varasm.c (mark_decl_referenced): Drop vtable_method handling code. * cp/class.c (cp_fold_obj_type_ref): Drop vtable_method. From-SVN: r172613 --- gcc/gimple-fold.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/gimple-fold.c') diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c index f1eb98e..f629fd5 100644 --- a/gcc/gimple-fold.c +++ b/gcc/gimple-fold.c @@ -80,7 +80,10 @@ can_refer_decl_in_current_unit_p (tree decl) return true; /* We are not at ltrans stage; so don't worry about WHOPR. Also when still gimplifying all referred comdat functions will be - produced. */ + produced. + ??? as observed in PR20991 for already optimized out comdat virtual functions + we may not neccesarily give up because the copy will be output elsewhere when + corresponding vtable is output. */ if (!flag_ltrans && (!DECL_COMDAT (decl) || !cgraph_function_flags_ready)) return true; /* If we already output the function body, we are safe. */ -- cgit v1.1