summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/error20.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/other/error20.C')
-rw-r--r--gcc/testsuite/g++.dg/other/error20.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/error20.C b/gcc/testsuite/g++.dg/other/error20.C
new file mode 100644
index 000000000..f3b17aa19
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/error20.C
@@ -0,0 +1,13 @@
+// PR c++/34275
+// { dg-do compile }
+
+struct A // { dg-message "operator=|no known conversion" }
+{
+ virtual A foo ();
+};
+
+void bar (A& a)
+{
+ a.foo () = 0; // { dg-error "A::foo\\(\\) = 0" }
+ // { dg-message "candidate" "candidate note" { target *-*-* } 11 }
+}