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
This commit is contained in:
parent
3da557ec14
commit
cc14602e32
3 changed files with 19 additions and 0 deletions
|
@ -1,5 +1,8 @@
|
|||
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. */
|
||||
|
|
11
gcc/testsuite/g++.dg/cpp1z/noexcept-type16.C
Normal file
11
gcc/testsuite/g++.dg/cpp1z/noexcept-type16.C
Normal file
|
@ -0,0 +1,11 @@
|
|||
// 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>();
|
||||
}
|
Loading…
Add table
Reference in a new issue