Landing: 5958e61d12f2

Project / Subsystem

gcc / gcc

Date

2026-06-05

Author

Andrew Pinski

Commit

5958e61d12f21cead59e6cdaa592ac648e6f6add

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc
patch_id
commit_hash
5958e61d12f21cead59e6cdaa592ac648e6f6add
source_type
github
headline
Fix `EXECUTE_IF_SET_IN_HARD_REG_SET` usage in `rtl-ssa/insns.cc`
tldr
GCC fixes a bug in how `EXECUTE_IF_SET_IN_HARD_REG_SET` is used, preventing incorrect register clobber handling during RTL SSA processing by explicitly managin…
author
Andrew Pinski
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • bugfix
  • compiler-internals
  • rtl
  • register-allocation
discussion_id_link
bugzilla_pr
date
2026-06-05T00:00:00.000Z

GCC has corrected a subtle bug in rtl-ssa/insns.cc related to the EXECUTE_IF_SET_IN_HARD_REG_SET macro. The issue, reported as PR rtl-optimization/125609 and PR middle-end/122992, involved the macro being used with temporary variables whose lifetimes expired prematurely, leading to garbage values or deleted stores for register clobber information. The fix now explicitly stores the result of abi.full_reg_clobbers() into a variable, ensuring its lifetime extends throughout the macro’s execution and enabling correct register tracking.