From 23d12941a34ee98bfc9bb0067bf0970df93eea28 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 4 Aug 2017 22:15:48 +0000 Subject: [PATCH] re PR c++/79790 ([C++17] ICE class template argument deduction failed) /cp 2017-08-04 Paolo Carlini 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 PR c++/79790 * g++.dg/cpp1z/class-deduction42.C: New. From-SVN: r250883 --- gcc/testsuite/ChangeLog | 2 +- gcc/testsuite/g++.dg/cpp1z/class-deduction43.C | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/cpp1z/class-deduction43.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c936479fbfb..e6064d2f9e0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,7 +1,7 @@ 2017-08-04 Paolo Carlini PR c++/79790 - * g++.dg/cpp1z/class-deduction42.C: New. + * g++.dg/cpp1z/class-deduction43.C: New. 2017-08-04 Yury Gribov diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction43.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction43.C new file mode 100644 index 00000000000..a906a0f3626 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction43.C @@ -0,0 +1,10 @@ +// PR c++/79790 +// { dg-options -std=c++1z } + +template +struct array +{ + int a [N]; +}; + +array a = { 1, 2, 3 }; // { dg-error "cannot deduce" } -- 2.30.2