From: Nathan Sidwell Date: Thu, 3 Dec 2020 16:40:43 +0000 (-0800) Subject: c++: Testcases [PR 98115] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7254a78cf4c419a9b9361289d8c535130cf1dfd0;p=gcc.git c++: Testcases [PR 98115] These two testcases provide coverage for 98115, which doesn't trigger on all hosts. PR c++/98115 PR c++/98116 gcc/testsuite/ * g++.dg/template/pr98115.C: New. * g++.dg/template/pr98116.C: New. --- diff --git a/gcc/testsuite/g++.dg/template/pr98115.C b/gcc/testsuite/g++.dg/template/pr98115.C new file mode 100644 index 00000000000..0bfc57ab88e --- /dev/null +++ b/gcc/testsuite/g++.dg/template/pr98115.C @@ -0,0 +1,4 @@ +// PR 98115, dependent array types lead to specialization issues + +template class Stringify; +template class Stringify; diff --git a/gcc/testsuite/g++.dg/template/pr98116.C b/gcc/testsuite/g++.dg/template/pr98116.C new file mode 100644 index 00000000000..d3398d2238c --- /dev/null +++ b/gcc/testsuite/g++.dg/template/pr98116.C @@ -0,0 +1,29 @@ +// PR 98116, ICE with stripping typedef array type +// { dg-do compile { target c++11 } } +namespace std { +struct is_convertible; +template using remove_pointer_t = typename _Tp ::type; +template struct enable_if; +template void declval(); +template using enable_if_t = typename enable_if<_Cond>::type; +template class Trans_NS___cxx11_basic_string { + long _M_string_length; +}; +} // namespace std +struct string16_char_traits; +template class std::Trans_NS___cxx11_basic_string; +template using IsLegalDataConversion = std::is_convertible; +template +using ContainerHasConvertibleData = IsLegalDataConversion< + std::remove_pointer_t)>, T>; +template +using EnableIfSpanCompatibleArray = + std::enable_if_t::value>; +template class span { + template [N], + std::Trans_NS___cxx11_basic_string, Extent>> + span(); +};