Landing: d9de08d4cf6e

Project / Subsystem

gcc / gccrs

Date

2026-09-10

Author

Philip Herron

Commit

d9de08d4cf6e8cb940015656da5a30ccbdb895b5

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gccrs
patch_id
—
commit_hash
d9de08d4cf6e8cb940015656da5a30ccbdb895b5
source_type
github
headline
Addressable constructors needed for borrowed slice data in gccrs
tldr
GCC Rust's constant evaluation now handles borrowed slice data correctly by making constructors addressable.
author
Philip Herron
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • gccrs
  • • rust
  • • const evaluation
  • • bugfix
discussion_id_link
—
bugzilla_pr
—
date
2026-09-10T00:00:00.000Z

Philip Herron fixed an issue in gccrs where constructors used for borrowed slice data were not properly addressable during constant evaluation. When compiling constant expressions involving slices, gccrs needs these constructors to be addressable objects, similar to temporary variables, which GCC’s regular compilation optimizes away. This commit makes these constructor expressions addressable, resolving issues 4867 and 4868 and adding a new test case.