OSDN Git Service

PR c++/9167, c++/9358
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Jan 2003 23:59:22 +0000 (23:59 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Jan 2003 23:59:22 +0000 (23:59 +0000)
        * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61459 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/g++.dg/init/inline1.C [new file with mode: 0644]

index 7a148f5..562c845 100644 (file)
@@ -1,5 +1,10 @@
 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
        * call.c (build_conditional_expr): Always do lvalue-rvalue
        conversion.
index f494ab3..d2b7527 100644 (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;
     }
diff --git a/gcc/testsuite/g++.dg/init/inline1.C b/gcc/testsuite/g++.dg/init/inline1.C
new file mode 100644 (file)
index 0000000..f3e3234
--- /dev/null
@@ -0,0 +1,14 @@
+// PR c++/9167
+// { dg-options "-finline" }
+
+struct A {
+  ~A();
+  A f(A) { }
+};
+
+
+void f(void)
+{
+  A a;
+  a.f(a);
+}