diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2017-10-18 07:43:06 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2017-10-18 07:43:06 +0000 |
commit | 257792c5e2aa931f4bf532aedd0d5d19b44567f3 (patch) | |
tree | 17957b03e3bb3307df6c12c54fea7aef4cd6295c /gcc | |
parent | f381d87aa5928ecdfe531b2c8706843f65c951b9 (diff) | |
download | gcc-257792c5e2aa931f4bf532aedd0d5d19b44567f3.zip gcc-257792c5e2aa931f4bf532aedd0d5d19b44567f3.tar.gz gcc-257792c5e2aa931f4bf532aedd0d5d19b44567f3.tar.bz2 |
re PR c++/68884 (template of value template crashes the compiler)
2017-10-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/68884
* g++.dg/cpp0x/variadic-crash4.C: New.
From-SVN: r253843
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/variadic-crash4.C | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d5fc8d8..cd8a3e6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2017-10-18 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/68884 + * g++.dg/cpp0x/variadic-crash4.C: New. + +2017-10-18 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/79474 * g++.dg/cpp1y/auto-fn44.C: New. diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-crash4.C b/gcc/testsuite/g++.dg/cpp0x/variadic-crash4.C new file mode 100644 index 0000000..2974fe9 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/variadic-crash4.C @@ -0,0 +1,14 @@ +// PR c++/68884 +// { dg-do compile { target c++11 } } + +namespace std { + template <typename _Tp, _Tp __v> struct A { static constexpr _Tp value = __v; }; +typedef A<bool, true> true_type; +} +template <int> struct VsA; +template <class ValueType> struct ValueTemplate { + template <template <ValueType> class, class> struct IsInstanceOf; + template <template <ValueType> class TemplateA, ValueType... TypesA> + struct IsInstanceOf<TemplateA, TemplateA<TypesA...>> : std::true_type {}; +}; +bool foo = ValueTemplate<int>::IsInstanceOf<VsA, VsA<0>>::value; |