8sa1-gcc/gcc/testsuite/g++.dg/cpp0x/initlist-array10.C
Jason Merrill 8f25c39c45 c++: Fix array of char typedef in template (PR90966).
Since Martin Sebor's patch for PR 71625 to change braced array initializers
to STRING_CST in some cases, we need to be ready for STRING_CST with types
that are changed by tsubst.  fold_convert doesn't know how to deal with
STRING_CST, which is reasonable; we really shouldn't expect it to here.  So
let's handle STRING_CST separately.

	PR c++/90966
	* pt.c (tsubst_copy) [STRING_CST]: Don't use fold_convert.
2020-01-27 15:02:52 -05:00

15 lines
170 B
C

// PR c++/90966
// { dg-do compile { target c++11 } }
template<typename I>
void f()
{
using S = signed char;
constexpr const S v[]{0};
}
int main()
{
f<int>();
}