Landing: 71f161d8c5dc

Project / Subsystem

gcc / middle-end

Date

2026-05-04

Author

Richard Biener

Commit

71f161d8c5dc2cba7e6a74e87a1b7b86000036e0

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
middle-end
patch_id
commit_hash
71f161d8c5dc2cba7e6a74e87a1b7b86000036e0
source_type
github
headline
Fold_stmt releases SSA names on simplification failure.
tldr
The fold_stmt function now releases SSA names when match-and-simplify fails, preventing memory leaks.
author
Richard Biener
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • middle-end
  • memory management
  • bugfix
  • ssa
discussion_id_link
bugzilla_pr
date
2026-05-04T00:00:00.000Z

The fold_stmt function in gimple-fold.cc now discards statements in the sequence after a failed gimple_simplify attempt. This prevents memory leaks by releasing SSA names that were pushed but not ultimately used due to simplification failure. This fix addresses PR middle-end/125146.