+2020-04-18 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/92187
+ * pt.c (splice_late_return_type): Propagate cv-qualifiers and
+ PLACEHOLDER_TYPE_CONSTRAINTS from the original auto node to the new one.
+
2020-04-17 Patrick Palka <ppalka@redhat.com>
PR c++/94483
{
tree idx = get_template_parm_index (*auto_node);
if (TEMPLATE_PARM_LEVEL (idx) <= processing_template_decl)
- /* In an abbreviated function template we didn't know we were dealing
- with a function template when we saw the auto return type, so update
- it to have the correct level. */
- *auto_node = make_auto_1 (TYPE_IDENTIFIER (*auto_node), true);
+ {
+ /* In an abbreviated function template we didn't know we were dealing
+ with a function template when we saw the auto return type, so update
+ it to have the correct level. */
+ tree new_auto = make_auto_1 (TYPE_IDENTIFIER (*auto_node), false);
+ PLACEHOLDER_TYPE_CONSTRAINTS (new_auto)
+ = PLACEHOLDER_TYPE_CONSTRAINTS (*auto_node);
+ TYPE_CANONICAL (new_auto) = canonical_type_parameter (new_auto);
+ new_auto = cp_build_qualified_type (new_auto, TYPE_QUALS (*auto_node));
+ *auto_node = new_auto;
+ }
}
return type;
}
+2020-04-18 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/92187
+ * g++.dg/concepts/abbrev5.C: New test.
+ * g++.dg/concepts/abbrev6.C: New test.
+
2020-04-17 Jeff Law <law@redhat.com>
PR rtl-optimization/90275