Landing: 20c529f47542

Project / Subsystem

gcc / gcc/hard-reg-set

Date

2026-06-05

Author

Xi Ruoyao

Commit

20c529f47542e94e921556684f8ce27495135926

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc/hard-reg-set
patch_id
commit_hash
20c529f47542e94e921556684f8ce27495135926
source_type
github
headline
Hard-reg-set: Make temporary SET for EXECUTE_IF_SET_IN_HARD_REG_SET a build-time error
tldr
GCC now prevents the use of temporary `SET` objects with `EXECUTE_IF_SET_IN_HARD_REG_SET` at build time, avoiding future errors.
author
Xi Ruoyao
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • rtl-optimization
  • compiler-internals
  • build-time-check
discussion_id_link
bugzilla_pr
date
2026-06-05T00:00:00.000Z

This change enhances the GCC compiler’s internal consistency by making it a build-time error to use temporary SET objects with the EXECUTE_IF_SET_IN_HARD_REG_SET macro. Previously, this could lead to subtle issues that were difficult to diagnose. By introducing a new build_error_on_rvalue function and calling it from the macro, future incorrect usage is proactively caught during GCC’s own compilation.