re PR c++/79790 ([C++17] ICE class template argument deduction failed)
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 4 Aug 2017 22:15:48 +0000 (22:15 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 4 Aug 2017 22:15:48 +0000 (22:15 +0000)
/cp
2017-08-04  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/79790
* pt.c (do_class_deduction): Handle the case of no viable implicit
deduction guides; simplify the code generating implicit deduction
guides.

/testsuite
2017-08-04  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/79790
* g++.dg/cpp1z/class-deduction42.C: New.

From-SVN: r250883

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1z/class-deduction43.C [new file with mode: 0644]

index c936479fbfb27176b14978ee289a691204001829..e6064d2f9e002c7fee4f93192b898576811f1260 100644 (file)
@@ -1,7 +1,7 @@
 2017-08-04  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/79790
-       * g++.dg/cpp1z/class-deduction42.C: New.
+       * g++.dg/cpp1z/class-deduction43.C: New.
 
 2017-08-04  Yury Gribov  <tetra2005@gmail.com>
 
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction43.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction43.C
new file mode 100644 (file)
index 0000000..a906a0f
--- /dev/null
@@ -0,0 +1,10 @@
+// PR c++/79790
+// { dg-options -std=c++1z }
+
+template <int N>
+struct array
+{
+  int a [N];
+};
+
+array a = { 1, 2, 3 };  // { dg-error "cannot deduce" }