re PR c++/77548 (ICE on invalid C++ code with overloaded functions: in instantiate_ty...
authorMarek Polacek <polacek@redhat.com>
Sat, 8 Jun 2019 13:13:48 +0000 (13:13 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Sat, 8 Jun 2019 13:13:48 +0000 (13:13 +0000)
PR c++/77548
* g++.dg/other/pr77548.C: New test.

From-SVN: r272079

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/pr77548.C [new file with mode: 0644]

index 72ee262ff808d069dd0adacc81a97358a30dd634..a554e88ac48f03c89a939eaffe204e0ea9c74c11 100644 (file)
@@ -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 (file)
index 0000000..842a9e9
--- /dev/null
@@ -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" }
+};