diff options
author | Jason Merrill <jason@redhat.com> | 2023-12-12 18:07:28 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2024-05-01 14:59:26 -0400 |
commit | a12cae973900f118436ef85c1197e91bf0428280 (patch) | |
tree | 77887bf5d629fa2afe7305845640bcbb8a61d216 /gcc/testsuite/g++.dg/debug/dwarf2/array-4.C | |
parent | 76ca6e1f8b1524b82a871ce29cf58c79e5e77e2b (diff) |
c++: drop in-charge for dtors without vbases
Constructors and destructors use the in-charge parameter to decide whether
they're responsible for recursing into virtual bases. Historically all
destructors had this parameter in order to also distinguish the deleting
destructor. But r151673 in GCC 4.5 changed the deleting destructor to just
call the complete destructor and then operator delete, making the in-charge
parameter no longer relevant for destructors in classes without virtual
bases. Having it causes confusion in constexpr evaluation, which assumes
that clones will have the same parameters as the cloned 'tor.
gcc/cp/ChangeLog:
* cp-tree.h (base_ctor_identifier): Adjust comment.
* call.cc (in_charge_arg_for_name): Abort on deleting dtor.
* decl2.cc (maybe_retrofit_in_chrg): Don't add it for
destructors without vbases, either.
* constexpr.cc (cxx_eval_call_expression): Remove workaround.
gcc/testsuite/ChangeLog:
* g++.dg/debug/dwarf2/array-3.C: No more 'int' for in-chrg parm.
* g++.dg/debug/dwarf2/array-4.C: Likewise.
Diffstat (limited to 'gcc/testsuite/g++.dg/debug/dwarf2/array-4.C')
-rw-r--r-- | gcc/testsuite/g++.dg/debug/dwarf2/array-4.C | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/array-4.C b/gcc/testsuite/g++.dg/debug/dwarf2/array-4.C index 6b3f546c1b5..6133234181a 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/array-4.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/array-4.C @@ -11,6 +11,6 @@ const S array[2] = { S(), S() }; /* Like array-3, but with a non-member array without a separate declaration, to check that we don't issue the nonsensical DW_TAG_const_type used by the member array declaration there. */ -/* { dg-final { scan-assembler-times " DW_TAG_const_type" 4 } } */ +/* { dg-final { scan-assembler-times " DW_TAG_const_type" 3 } } */ /* { dg-final { scan-assembler-times " DW_TAG_subrange_type" 2 } } */ /* { dg-final { scan-assembler-times " DW_AT_upper_bound" 1 } } */ |