Continuing scouring older C++ PRs. This one ICEd but was fixed by r240098; let's make sure we don't re-introduce that bug.
Tested x86_64-linux, applying to trunk. 2019-06-08 Marek Polacek <pola...@redhat.com> PR c++/77548 * g++.dg/other/pr77548.C: New test. diff --git gcc/testsuite/g++.dg/other/pr77548.C gcc/testsuite/g++.dg/other/pr77548.C new file mode 100644 index 00000000000..842a9e9d28b --- /dev/null +++ gcc/testsuite/g++.dg/other/pr77548.C @@ -0,0 +1,9 @@ +// PR c++/77548 +// { dg-do compile } +// { dg-options "" } + +struct S +{ + int f (void) { return 0; } + int f (int) { return f ? : 1; } // { dg-error "cannot resolve overloaded function" } +};