re PR c++/66392 (rejects-valid: copy-initialization through user-defined conversion...
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 4 Aug 2015 14:54:07 +0000 (14:54 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 4 Aug 2015 14:54:07 +0000 (14:54 +0000)
2015-08-04  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/66392
* g++.dg/init/explicit4.C: New.

From-SVN: r226579

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

index adce7ea4f1e627c0e681ebc4f3631e7438145137..7f442854815db2f6bcb5296cddbb7dd895cada96 100644 (file)
@@ -1,3 +1,8 @@
+2015-08-04  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/66392
+       * g++.dg/init/explicit4.C: New.
+
 2015-08-04  Bill Schmidt  <wschmidt@vnet.linux.ibm.com>
 
        * gcc.target/powerpc/vec-cmp-sel.c: Avoid test failure on machines
diff --git a/gcc/testsuite/g++.dg/init/explicit4.C b/gcc/testsuite/g++.dg/init/explicit4.C
new file mode 100644 (file)
index 0000000..4a73de5
--- /dev/null
@@ -0,0 +1,12 @@
+// PR c++/66392
+
+struct B { };
+
+struct A {
+  explicit A (A const&);
+  A (B const&);
+};
+
+int main () {
+  A x = B ();
+}