diff mbox series

[C++] Add test for c++/77548

Message ID 20190608131846.GW5989@redhat.com
State New
Headers show
Series [C++] Add test for c++/77548 | expand

Commit Message

Marek Polacek June 8, 2019, 1:18 p.m. UTC
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 mbox series

Patch

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" }
+};