aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-02-20 18:18:11 -0500
committerJason Merrill <jason@gcc.gnu.org>2011-02-20 18:18:11 -0500
commit06be49223f63ea7f3cf57146cc580fc1ee73d619 (patch)
treed82f0c11743b49ec053fa200217217430b85b57b /gcc/testsuite
parent525c617d3b92c10f79d1ffc786fb87dbf0958f0b (diff)
downloadgcc-06be49223f63ea7f3cf57146cc580fc1ee73d619.zip
gcc-06be49223f63ea7f3cf57146cc580fc1ee73d619.tar.gz
gcc-06be49223f63ea7f3cf57146cc580fc1ee73d619.tar.bz2
re PR c++/47703 ([C++0x] ICE: std::sort chokes on simple lambda function)
PR c++/47703 * error.c (location_of): Handle non-tagged types. From-SVN: r170349
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog2
-rw-r--r--gcc/testsuite/g++.dg/overload/conv-op1.C17
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 9eff5ff..91ef5f1 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,7 @@
2011-02-20 Jason Merrill <jason@redhat.com>
+ * g++.dg/overload/conv-op1.C: New.
+
* g++.dg/cpp0x/constexpr-synth1.C: New.
2011-02-20 Nicola Pero <nicola.pero@meta-innovation.com>
diff --git a/gcc/testsuite/g++.dg/overload/conv-op1.C b/gcc/testsuite/g++.dg/overload/conv-op1.C
new file mode 100644
index 0000000..6a63cba
--- /dev/null
+++ b/gcc/testsuite/g++.dg/overload/conv-op1.C
@@ -0,0 +1,17 @@
+// PR c++/47703
+
+typedef void (*pfn)(int &);
+
+struct A
+{
+ operator pfn() { return 0; }
+};
+
+void f()
+{
+ const int i = 42;
+ A()(i); // { dg-message "<conversion>" }
+}
+
+// { dg-prune-output "no match" }
+// { dg-prune-output "candidate" }