From: Jan Hubicka Date: Sat, 26 Jun 2004 10:23:05 +0000 (+0200) Subject: re PR c++/14865 (No instantiation of VTT at -O1) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e9e4d4ee5bd8785e26bc03f932ffbcfd6b19b918;p=gcc.git re PR c++/14865 (No instantiation of VTT at -O1) PR C++/14865 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the reachability analysis. From-SVN: r83707 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index bfb995cb0af..f5d903cdb6f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2004-06-26 Jan Hubicka + + PR C++/14865 + * decl2.c (maybe_emit_vtables): Always import_export_vtable for the + reachability analysis. + 2004-06-25 Mark Mitchell * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 5b2351975b9..ae310768b75 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1564,12 +1564,14 @@ maybe_emit_vtables (tree ctype) return false; import_export_class (ctype); - import_export_vtable (primary_vtbl, ctype, 1); /* See if any of the vtables are needed. */ for (vtbl = CLASSTYPE_VTABLES (ctype); vtbl; vtbl = TREE_CHAIN (vtbl)) - if (!DECL_EXTERNAL (vtbl) && DECL_NEEDED_P (vtbl)) - break; + { + import_export_vtable (vtbl, ctype, 1); + if (!DECL_EXTERNAL (vtbl) && DECL_NEEDED_P (vtbl)) + break; + } if (!vtbl) { /* If the references to this class' vtables are optimized away,