* mangle.c (write_type): Put the eh spec back on the function type.
From-SVN: r249321
2017-06-16 Jason Merrill <jason@redhat.com>
+ PR c++/80614 - Wrong mangling for C++17 noexcept type
+ * mangle.c (write_type): Put the eh spec back on the function type.
+
PR c++/81102 - Wrong error with partial specialization.
* pt.c (unify) [TEMPLATE_PARM_INDEX]: Strip reference when comparing
types. Do type deduction later.
|| TREE_CODE (t) == METHOD_TYPE)
{
t = build_ref_qualified_type (t, type_memfn_rqual (type));
+ if (flag_noexcept_type)
+ {
+ tree r = TYPE_RAISES_EXCEPTIONS (type);
+ t = build_exception_variant (t, r);
+ }
if (abi_version_at_least (8)
|| type == TYPE_MAIN_VARIANT (type))
/* Avoid adding the unqualified function type as a substitution. */
--- /dev/null
+// PR c++/80614
+// { dg-options -std=c++1z }
+
+template <typename T> void fn() {}
+
+int main() {
+ // { dg-final { scan-assembler "_Z2fnIKFvvEEvv" } }
+ fn<void() const>();
+ // { dg-final { scan-assembler "_Z2fnIKDoFvvEEvv" } }
+ fn<void() const noexcept>();
+}