PR c++/51430
* pt.c (tsubst_decl): Don't call strip_array_domain on
error_mark_node.
* g++.dg/template/static32.C: New test.
From-SVN: r182063
+2011-12-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/51430
+ * pt.c (tsubst_decl): Don't call strip_array_domain on
+ error_mark_node.
+
2011-12-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51431
type = DECL_ORIGINAL_TYPE (t);
else
type = TREE_TYPE (t);
- if (TREE_CODE (t) == VAR_DECL && VAR_HAD_UNKNOWN_BOUND (t))
+ if (TREE_CODE (t) == VAR_DECL
+ && VAR_HAD_UNKNOWN_BOUND (t)
+ && type != error_mark_node)
type = strip_array_domain (type);
type = tsubst (type, args, complain, in_decl);
}
+2011-12-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/51430
+ * g++.dg/template/static32.C: New test.
+
2011-12-06 Uros Bizjak <ubizjak@gmail.com>
* g++.dg/opt/pr51396.C: Use dg-additional-options.
--- /dev/null
+// PR c++/51430
+// { dg-do compile }
+
+template<int> struct A
+{
+ static const int x[] = 0; // { dg-error "in-class initialization|initializer fails" }
+};
+
+A<0> a;