Skip to content
Snippets Groups Projects
Commit cc14602e authored by Jason Merrill's avatar Jason Merrill Committed by Jason Merrill
Browse files

PR c++/80614 - Wrong mangling for C++17 noexcept type

	* mangle.c (write_type): Put the eh spec back on the function type.

From-SVN: r249321
parent 3da557ec
No related branches found
No related tags found
No related merge requests found
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.
......
......@@ -2100,6 +2100,11 @@ write_type (tree type)
|| 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. */
......
// 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>();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment