PR c++/27547
* decl.c (copy_fn_p): Return early on non-member functions.
* g++.dg/other/operator1.C: New test.
From-SVN: r113698
+2006-05-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/27547
+ * decl.c (copy_fn_p): Return early on non-member functions.
+
2006-05-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* decl.c (grok_op_properties): Add missing return value.
tree arg_type;
int result = 1;
- gcc_assert (DECL_FUNCTION_MEMBER_P (d));
+ if (!DECL_FUNCTION_MEMBER_P (d))
+ /* Non-members are invalid. We complained, but kept the declaration. */
+ return 0;
if (DECL_TEMPLATE_INFO (d)
&& DECL_MEMBER_TEMPLATE_P (DECL_TI_TEMPLATE (d)))
+2006-05-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/27547
+ * g++.dg/other/operator1.C: New test.
+
2006-05-09 Richard Guenther <rguenther@suse.de>
PR tree-optimization/27136
--- /dev/null
+// PR c++/27547
+// { dg-do compile }
+
+int operator=(int); // { dg-error "member function|two arguments" }
+
+void foo()
+{
+ operator=(0);
+}