This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
(C++) patch to finish_vtable_vardecl
- To: egcs-patches at cygnus dot com
- Subject: (C++) patch to finish_vtable_vardecl
- From: Jason Merrill <jason at cygnus dot com>
- Date: Sat, 3 Oct 1998 15:46:31 -0700
I just checked this in to fix a problem with vtables not being emitted in
some cases.
1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
instead of linkage.
Index: decl2.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/decl2.c,v
retrieving revision 1.137
diff -c -p -r1.137 decl2.c
*** decl2.c 1998/09/28 17:34:31 1.137
--- decl2.c 1998/10/03 22:42:27
*************** finish_vtable_vardecl (prev, vars)
*** 2703,2710 ****
tree prev, vars;
{
if (! DECL_EXTERNAL (vars)
! && ((TREE_PUBLIC (vars) && ! DECL_WEAK (vars) && ! DECL_ONE_ONLY (vars))
! || CLASSTYPE_EXPLICIT_INSTANTIATION (DECL_CONTEXT (vars))
|| TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (vars))
|| (hack_decl_function_context (vars) && TREE_USED (vars)))
&& ! TREE_ASM_WRITTEN (vars))
--- 2703,2709 ----
tree prev, vars;
{
if (! DECL_EXTERNAL (vars)
! && (DECL_INTERFACE_KNOWN (vars)
|| TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (vars))
|| (hack_decl_function_context (vars) && TREE_USED (vars)))
&& ! TREE_ASM_WRITTEN (vars))