PR c++/55262
* method.c (implicitly_declare_fn): Set DECL_PARM_INDEX on
the parms of an inheriting ctor.
From-SVN: r193622
2012-11-19 Jason Merrill <jason@redhat.com>
+ PR c++/55262
+ * method.c (implicitly_declare_fn): Set DECL_PARM_INDEX on
+ the parms of an inheriting ctor.
+
PR c++/55261
* class.c (add_implicitly_declared_members): Use
lookup_fnfields_slot to get the base constructors.
else if (kind == sfk_inheriting_constructor)
{
tree *p = &DECL_ARGUMENTS (fn);
+ int index = 1;
for (tree parm = inherited_parms; parm != void_list_node;
parm = TREE_CHAIN (parm))
{
*p = cp_build_parm_decl (NULL_TREE, TREE_VALUE (parm));
+ retrofit_lang_decl (*p);
+ DECL_PARM_LEVEL (*p) = 1;
+ DECL_PARM_INDEX (*p) = index++;
DECL_CONTEXT (*p) = fn;
p = &DECL_CHAIN (*p);
}
-// { dg-options "-std=c++11" }
+// { dg-options "-std=c++11 -g" }
struct A
{