]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/27279 (ICE with invalid constructor declaration)
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>
Sat, 29 Apr 2006 20:55:44 +0000 (20:55 +0000)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Sat, 29 Apr 2006 20:55:44 +0000 (20:55 +0000)
PR c++/27279
* decl.c (copy_fn_p): Skip functions with invalid first arg.

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

From-SVN: r113380

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

index 74fce51c3158bd9a28a0a56dbbf597b77712e933..cfc4cc19e863a7ad501e079a18ca4c25174ee31e 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-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
 
        PR c++/26558
index 9b1784313672b4811fa89b75c2e6271c3292f1aa..5adaf966e71a6ec167bc7854bd67d1294289bfb4 100644 (file)
@@ -8491,6 +8491,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 b712c8d121b9609e091439f78bde20f5e2f720c9..af1b155246273d680a7a7dafb448e7b7fd26a6d4 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-25  Roger Sayle  <roger@eyesopen.com>
 
        PR target/26961
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" }
+};