Landing: 59b82e3f4f88

Project / Subsystem

gcc / tree-eh

Date

2026-09-01

Author

Andrea Pinski

Commit

59b82e3f4f88a02158c56921effcc078ab1a5580

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
tree-eh
patch_id
—
commit_hash
59b82e3f4f88a02158c56921effcc078ab1a5580
source_type
github
headline
tree-eh: Fix lhs_could_trap_p for *this pointer accesses
tldr
Correctly handle pointer dereferences on the left-hand side of assignments that might trap.
author
Andrea Pinski
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • c++
  • • optimization
  • • exception handling
discussion_id_link
—
bugzilla_pr
—
date
2026-09-01T00:00:00.000Z

The compiler previously treated this->a as non-trapping on the left-hand side of an assignment, which could be incorrect if the memory was not read-only. This change refactors tree_could_trap_p into a new function tree_could_trap_1 that properly considers the left-hand side, resolving issues with constant method this pointer accesses.