diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.brendan/ambiguity1.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.brendan/ambiguity1.C | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/ambiguity1.C b/gcc/testsuite/g++.old-deja/g++.brendan/ambiguity1.C new file mode 100644 index 000000000..4706d7e8a --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.brendan/ambiguity1.C @@ -0,0 +1,18 @@ +// { dg-do assemble } +// GROUPS passed ambiguity +struct A { + A (int); +}; + +struct B { + B (int); +}; + +void myfunc (const A& t0); // { dg-message "note" } +void myfunc (const B& t0); // { dg-message "note" } + +int main () +{ + myfunc(1); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 16 } +} |