Landing: 95986d90c4e9
Project / Subsystem
gcc / pta
Date
2026-07-01
Author
Eric Botcazou
Commit
95986d90c4e90691820f08f6f43d48d24cc44495
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- pta
- patch_id
- —
- commit_hash
- 95986d90c4e90691820f08f6f43d48d24cc44495
- source_type
- github
- headline
- Fix incorrect optimization of conditional dynamic allocation in PTA
- tldr
- Corrects a bug where DSE incorrectly removed memcpy calls for dynamically allocated memory returned from functions.
- author
- Eric Botcazou
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • PTA
- • alias analysis
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-01T00:00:00.000Z
A regression in the Pointer Tangling Analysis (PTA) pass incorrectly eliminates calls to memcpy when the destination is dynamically allocated and the allocation is conditional. This fix ensures that the analysis correctly handles cases where the dynamic allocation’s result is returned from a function, preventing premature optimization that could violate program semantics.