Landing: 513f02c7c565
Project / Subsystem
gcc / c++
Date
2026-07-13
Author
Yuxuan Chen
Commit
513f02c7c565d6e874a6d57db30df87e7f3e2f37
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- c++
- patch_id
- —
- commit_hash
- 513f02c7c565d6e874a6d57db30df87e7f3e2f37
- source_type
- github
- headline
- c++: Avoid duplicate trivial_abi cleanup in cdtor clones [PR125066]
- tldr
- Prevents redundant cleanup operations for trivial_abi parameters in C++ constructor/destructor clones.
- author
- Yuxuan Chen
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • c++
- • optimization
- • test
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-13T00:00:00.000Z
Constructor and destructor clones in the C++ frontend were applying parameter cleanups redundantly. Since these clones already incorporate a generic copy of the original function body, including necessary parameter cleanups, this commit modifies store_parm_decls to avoid registering another front-end CLEANUP_STMT for trivial_abi parameters when processing a clone. A new test case, attr-trivial_abi10.C, has been added to verify this fix.