+2020-03-06 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/94027
+ * mangle.c (find_substitution): Don't call same_type_p on template
+ args that cannot match.
+
2020-03-04 Martin Sebor <msebor@redhat.com>
PR c++/90938
{
tree args = CLASSTYPE_TI_ARGS (type);
if (TREE_VEC_LENGTH (args) == 3
+ && (TREE_CODE (TREE_VEC_ELT (args, 0))
+ == TREE_CODE (char_type_node))
&& same_type_p (TREE_VEC_ELT (args, 0), char_type_node)
&& is_std_substitution_char (TREE_VEC_ELT (args, 1),
SUBID_CHAR_TRAITS)
args <char, std::char_traits<char> > . */
tree args = CLASSTYPE_TI_ARGS (type);
if (TREE_VEC_LENGTH (args) == 2
- && TYPE_P (TREE_VEC_ELT (args, 0))
+ && TREE_CODE (TREE_VEC_ELT (args, 0)) == TREE_CODE (char_type_node)
&& same_type_p (TREE_VEC_ELT (args, 0), char_type_node)
&& is_std_substitution_char (TREE_VEC_ELT (args, 1),
SUBID_CHAR_TRAITS))
--- /dev/null
+// { dg-do compile { target c++11 } }
+// PR 94027 ICE mangling
+
+class a {
+public:
+ a (char);
+};
+struct b {
+ b (a);
+};
+template <typename... aw, int...>
+void ax (int)
+{
+ struct c : b {
+ c () : b {sizeof...(aw)}
+ {}
+ };
+}
+
+void az() {
+ ax ({});
+}