PR c++/9167, c++/9358

PR c++/9167, c++/9358
        * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.

From-SVN: r61459
This commit is contained in:
Jason Merrill 2003-01-17 18:59:22 -05:00 committed by Jason Merrill
parent 77b996cc58
commit 753225c183
3 changed files with 23 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-01-17 Jason Merrill <jason@redhat.com>
PR c++/9167, c++/9358
* decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
2003-01-17 Jason Merrill <jason@redhat.com>
PR c++/9342

View File

@ -11828,7 +11828,10 @@ require_complete_types_for_parms (tree parms)
/* grokparms will have already issued an error */
TREE_TYPE (parms) = error_mark_node;
else if (complete_type_or_else (TREE_TYPE (parms), parms))
layout_decl (parms, 0);
{
layout_decl (parms, 0);
DECL_ARG_TYPE (parms) = type_passed_as (TREE_TYPE (parms));
}
else
TREE_TYPE (parms) = error_mark_node;
}

View File

@ -0,0 +1,14 @@
// PR c++/9167
// { dg-options "-finline" }
struct A {
~A();
A f(A) { }
};
void f(void)
{
A a;
a.f(a);
}