Landing: d5634bbbaaa5

Project / Subsystem

gcc / c++

Date

2026-08-14

Author

Patrick Palka

Commit

d5634bbbaaa5c0a23988703d0d62f66c6df561bd

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
c++
patch_id
—
commit_hash
d5634bbbaaa5c0a23988703d0d62f66c6df561bd
source_type
github
headline
Enable trial constexpr folding for INIT_EXPR in C++.
tldr
C++ compiler now trial-folds INIT_EXPR for constexpr evaluation, fixing test failures.
author
Patrick Palka
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • c++
  • • constexpr
  • • optimization
discussion_id_link
—
bugzilla_pr
—
date
2026-08-14T00:00:00.000Z

This patch enables trial constexpr folding for INIT_EXPR in the C++ front-end, mirroring existing support for TARGET_EXPR. This change addresses test failures in is_constant_evaluated3{a,b}.C by correctly handling local copy-initialization, which is represented as an INIT_EXPR.