From eb37013fb5f4017ed843fceed4461102d8ab8e2b Mon Sep 17 00:00:00 2001
From: Marek Polacek <polacek@redhat.com>
Date: Sat, 8 Jun 2019 13:13:48 +0000
Subject: [PATCH] re PR c++/77548 (ICE on invalid C++ code with overloaded
 functions: in instantiate_type, at cp/class.c:8270)

	PR c++/77548
	* g++.dg/other/pr77548.C: New test.

From-SVN: r272079
---
 gcc/testsuite/ChangeLog              | 3 +++
 gcc/testsuite/g++.dg/other/pr77548.C | 9 +++++++++
 2 files changed, 12 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/other/pr77548.C

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 72ee262ff808..a554e88ac48f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@
 2019-06-08  Marek Polacek  <polacek@redhat.com>
 
+	PR c++/77548
+	* g++.dg/other/pr77548.C: New test.
+
 	PR c++/72845
 	* g++.dg/cpp0x/noexcept41.C: New test.
 
diff --git a/gcc/testsuite/g++.dg/other/pr77548.C b/gcc/testsuite/g++.dg/other/pr77548.C
new file mode 100644
index 000000000000..842a9e9d28be
--- /dev/null
+++ b/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" }
+};
-- 
GitLab