diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-04-25 00:06:37 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2005-04-25 00:06:37 +0200 |
commit | 8634c649cb1ea6d85a53f1fab3bd28af869b934f (patch) | |
tree | ceb41f874d3b1e3d612a3d2785020f503973c21a /gcc/cp/class.c | |
parent | 49fc196e8edd206d1cd275cd015238e429056db7 (diff) | |
download | gcc-8634c649cb1ea6d85a53f1fab3bd28af869b934f.zip gcc-8634c649cb1ea6d85a53f1fab3bd28af869b934f.tar.gz gcc-8634c649cb1ea6d85a53f1fab3bd28af869b934f.tar.bz2 |
re PR middle-end/20991 (ICE in cgraph_mark_reachable_node)
PR middle-end/20991
* 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.
From-SVN: r98674
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 6423fbc..5052aaaf 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -35,6 +35,7 @@ Boston, MA 02111-1307, USA. */ #include "toplev.h" #include "target.h" #include "convert.h" +#include "cgraph.h" /* The number of nested classes being processed. If we are not in the scope of any class, this is zero. */ @@ -7719,6 +7720,8 @@ cp_fold_obj_type_ref (tree ref, tree known_type) DECL_VINDEX (fndecl))); #endif + cgraph_node (fndecl)->local.vtable_method = true; + return build_address (fndecl); } |