diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/other/error20.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/other/error20.C | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/other/error20.C b/gcc-4.9/gcc/testsuite/g++.dg/other/error20.C new file mode 100644 index 000000000..bb7d7b3b0 --- /dev/null +++ b/gcc-4.9/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 "operand types are 'A' and 'int'" } + // { dg-message "candidate" "candidate note" { target *-*-* } 11 } +} |