Landing: 7e3889b7a7af
Project / Subsystem
gcc / middle-end
Date
2026-07-03
Author
Tamar Christina
Commit
7e3889b7a7af7aea7549cecaa463bb10ab6eb75f
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- middle-end
- patch_id
- —
- commit_hash
- 7e3889b7a7af7aea7549cecaa463bb10ab6eb75f
- source_type
- github
- headline
- middle-end: Handle variable-length vector types in store_constructor
- tldr
- Initializes unused elements of VLAs in constructor expressions to zero.
- author
- Tamar Christina
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • middle-end
- • VLA
- • initialization
- • vector
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-03T00:00:00.000Z
GCC’s middle-end now correctly handles the initialization of variable-length vector (VLA) types within constructor expressions. Previously, VLAs in constructors fell back to piecewise memory stores without defined semantics for unspecified elements. This patch introduces the semantics that any unspecified elements in a VLA constructor will be initialized to zero, ensuring predictable behavior and preventing potential issues with uninitialized memory. This change impacts how constructible VLAs are generated, aligning with expected C++ behavior.