@@ -16772,7 +16772,6 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
case INTEGER_CST:
case REAL_CST:
- case STRING_CST:
case COMPLEX_CST:
{
/* Instantiate any typedefs in the type. */
@@ -16782,6 +16781,18 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
return r;
}
+ case STRING_CST:
+ {
+ tree type = tsubst (TREE_TYPE (t), args, complain, in_decl);
+ r = t;
+ if (type != TREE_TYPE (t))
+ {
+ r = copy_node (t);
+ TREE_TYPE (r) = type;
+ }
+ return r;
+ }
+
case PTRMEM_CST:
/* These can sometimes show up in a partial instantiation, but never
involve template parms. */
new file mode 100644
@@ -0,0 +1,14 @@
+// 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>();
+}