* class.c (build_vtable_entry_ref): Correct usage of
get_vtbl_decl_for_binfo.
From-SVN: r34195
2000-05-26 Mark Mitchell <mark@codesourcery.com>
+ * class.c (build_vtable_entry_ref): Correct usage of
+ get_vtbl_decl_for_binfo.
+
* decl2.c (grokclassfn): Set DECL_LANGUAGE here.
* method.c (implicitly_declare_fn): Not here.
static char asm_stmt[] = ".vtable_entry %c0, %c1";
tree s, i, i2;
- s = build_unary_op (ADDR_EXPR, get_vtbl_decl_for_binfo (basetype), 0);
+ s = build_unary_op (ADDR_EXPR,
+ get_vtbl_decl_for_binfo (TYPE_BINFO (basetype)),
+ 0);
s = build_tree_list (build_string (1, "s"), s);
i = build_array_ref (vtbl, idx);
--- /dev/null
+// Build don't link:
+// Special g++ Options: -fvtable-gc
+// Origin: Mark Mitchell <mitchell@codesourcery.com>
+
+struct S {
+ virtual void f ();
+};
+
+S* s;
+
+void g ()
+{
+ s->f ();
+}