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:
parent
77b996cc58
commit
753225c183
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
14
gcc/testsuite/g++.dg/init/inline1.C
Normal file
14
gcc/testsuite/g++.dg/init/inline1.C
Normal 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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user