summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-04 20:18:05 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-04 20:18:05 +0000
commit611ca89a42e7562251af3343e9922bc8d59eaf74 (patch)
treeb8e61e3eed80ab5a4bfb8bd4b19c07b43f0f5fb8 /gcc/testsuite/g++.dg
parentecce391740b84bfa5f666614fa34707e867cad04 (diff)
downloadgcc-611ca89a42e7562251af3343e9922bc8d59eaf74.tar.gz
PR c++/31419
* call.c (reference_binding): Don't look for user-defined conversions to the same type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128102 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r--gcc/testsuite/g++.dg/conversion/self1.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/conversion/self1.C b/gcc/testsuite/g++.dg/conversion/self1.C
new file mode 100644
index 00000000000..f36500a9fa5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/conversion/self1.C
@@ -0,0 +1,15 @@
+// PR c++/31419
+
+struct B
+{
+ template<typename T>
+ operator T const& () const
+ {
+ return 42;
+ }
+};
+
+B f()
+{
+ return B();
+}