diff options
author | Paolo Carlini <paolo@gcc.gnu.org> | 2017-10-20 00:30:41 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2017-10-20 00:30:41 +0000 |
commit | b6b240edae1d01a0d5746d940a201e635a449360 (patch) | |
tree | 3c591868de4e3cb981993b9e908355151a114e04 /gcc | |
parent | 6d2bd9ff82784c83e51492ceb240a852bacc0702 (diff) | |
download | gcc-b6b240edae1d01a0d5746d940a201e635a449360.zip gcc-b6b240edae1d01a0d5746d940a201e635a449360.tar.gz gcc-b6b240edae1d01a0d5746d940a201e635a449360.tar.bz2 |
re PR c++/82308 ([C++17] deduction of template arguments results in internal compiler error)
2017-10-19 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/82308
* g++.dg/cpp1z/class-deduction45.C: New.
From-SVN: r253920
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1z/class-deduction45.C | 24 |
2 files changed, 30 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8ef91aa..4aab328 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,9 @@ -2017-10-18 Uros Bizjak <ubizjak@gmail.com> +2017-10-19 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/82308 + * g++.dg/cpp1z/class-deduction45.C: New. + +2017-10-19 Uros Bizjak <ubizjak@gmail.com> Jakub Jelinek <jakub@redhat.com> 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 0000000..3fe8dd3 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction45.C @@ -0,0 +1,24 @@ +// PR c++/82308 +// { dg-options -std=c++17 } + +template<typename, unsigned> +struct array {}; + +template <unsigned R> +class X { +public: + using T = array<int, R>; + + enum class C : char { A, B }; + X(T bounds, C c = C::B) : t(bounds) {} + +private: + T t; +}; + +int main() +{ + array<int, 2> a; + X d{a}; + X<2> e{a}; +} |