OSDN Git Service

* semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
[pf3gnuchains/gcc-fork.git] / gcc / cp / semantics.c
index 589241f..c4ff2af 100644 (file)
@@ -2651,7 +2651,8 @@ baselink_for_fns (tree fns)
   if (!cl)
     cl = DECL_CONTEXT (fn);
   cl = TYPE_BINFO (cl);
-  return build_baselink (cl, cl, fns, /*optype=*/NULL_TREE);
+  return build_baselink (TYPE_BINFO (DECL_CONTEXT (fn)), cl, fns,
+                        /*optype=*/NULL_TREE);
 }
 
 /* Returns true iff DECL is an automatic variable from a function outside