Commit 61d1b821 by Jason Merrill Committed by Jason Merrill

re PR c++/55262 ([C++0x] g++.dg/cpp0x/inh-ctor10.C ICEs with -g)

	PR c++/55262
	* method.c (implicitly_declare_fn): Set DECL_PARM_INDEX on
	the parms of an inheriting ctor.

From-SVN: r193622
parent 5aeb7348
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.
......
......@@ -1663,10 +1663,14 @@ implicitly_declare_fn (special_function_kind kind, tree type,
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
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment