OSDN Git Service

PR c++/27279
authorreichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 29 Apr 2006 20:48:45 +0000 (20:48 +0000)
committerreichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 29 Apr 2006 20:48:45 +0000 (20:48 +0000)
* decl.c (copy_fn_p): Skip functions with invalid first arg.

* g++.dg/parse/ctor4.C: New test.

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

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

index 17e3b29..c93e39f 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-29  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR c++/27279
+       * decl.c (copy_fn_p): Skip functions with invalid first arg.
+
 2006-04-27  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/27292
index c7967c7..1617a47 100644 (file)
@@ -8829,6 +8829,8 @@ copy_fn_p (tree d)
     return 0;
 
   arg_type = TREE_VALUE (args);
+  if (arg_type == error_mark_node)
+    return 0;
 
   if (TYPE_MAIN_VARIANT (arg_type) == DECL_CONTEXT (d))
     {
index 7bd203e..1a5d0ab 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-29  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       PR c++/27279
+       * g++.dg/parse/ctor4.C: New test.
+
 2006-04-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
 
        PR fortran/25681
diff --git a/gcc/testsuite/g++.dg/parse/ctor4.C b/gcc/testsuite/g++.dg/parse/ctor4.C
new file mode 100644 (file)
index 0000000..a3e4868
--- /dev/null
@@ -0,0 +1,7 @@
+// PR c++/27279
+// { dg-do compile }
+
+struct A
+{
+  A(void,void);  // { dg-error "incomplete type|invalid use" }
+};