From b6b240edae1d01a0d5746d940a201e635a449360 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 20 Oct 2017 00:30:41 +0000 Subject: [PATCH] re PR c++/82308 ([C++17] deduction of template arguments results in internal compiler error) 2017-10-19 Paolo Carlini PR c++/82308 * g++.dg/cpp1z/class-deduction45.C: New. From-SVN: r253920 --- gcc/testsuite/ChangeLog | 7 +++++- .../g++.dg/cpp1z/class-deduction45.C | 24 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/cpp1z/class-deduction45.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8ef91aadc87..4aab328fae3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,9 @@ -2017-10-18 Uros Bizjak +2017-10-19 Paolo Carlini + + PR c++/82308 + * g++.dg/cpp1z/class-deduction45.C: New. + +2017-10-19 Uros Bizjak Jakub Jelinek PR target/82618 diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction45.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction45.C new file mode 100644 index 00000000000..3fe8dd33b79 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction45.C @@ -0,0 +1,24 @@ +// PR c++/82308 +// { dg-options -std=c++17 } + +template +struct array {}; + +template +class X { +public: + using T = array; + + enum class C : char { A, B }; + X(T bounds, C c = C::B) : t(bounds) {} + +private: + T t; +}; + +int main() +{ + array a; + X d{a}; + X<2> e{a}; +} -- 2.30.2