This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [4.0 PATCH] Avoid ICEs when OBJ_TYPE_REF folding finds a new reachable vtable method (PR middle-end/20991
- From: Richard Henderson <rth at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 20 Apr 2005 17:17:44 -0700
- Subject: Re: [4.0 PATCH] Avoid ICEs when OBJ_TYPE_REF folding finds a new reachable vtable method (PR middle-end/20991
- References: <20050418151652.GE17420@devserv.devel.redhat.com>
On Mon, Apr 18, 2005 at 11:16:52AM -0400, Jakub Jelinek wrote:
> For 4.1+ best would be to do some limited constant propagation during
> inlining and fold OBJ_TYPE_REFs there, which would allow us to inline them.
We'll still need this, since something more complex than any limited
propagation may still expose options.
> * cgraph.h (cgraph_local_info): Add vtable_method field.
> * varasm.c (mark_decl_referenced): If cgraph_global_info_ready
> and node is vtable_method, finalized and not reachable, don't do
> anything.
>
> * class.c: Include cgraph.h.
> (cp_fold_obj_type_ref): Set node->local.vtable_method.
> * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
>
> * g++.dg/opt/pr20991.C: New test.
Ok mainline and 4.0.1.
r~