[C++ PATCH] Add test for c++/77548
Marek Polacek
polacek@redhat.com
Sat Jun 8 13:18:00 GMT 2019
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 <polacek@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" }
+};
More information about the Gcc-patches
mailing list