Landing: 64627d4f8349
Project / Subsystem
gcc / gcc/c++/reflection
Date
2026-06-09
Author
Marek Polacek
Commit
64627d4f8349af24f5a84c0936eb00256769b534
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc/c++/reflection
- patch_id
- —
- commit_hash
- 64627d4f8349af24f5a84c0936eb00256769b534
- source_type
- github
- headline
- C++ reflection avoids Internal Compiler Error with constructor parameters.
- tldr
- GCC fixes an Internal Compiler Error (ICE) that occurred when compiling C++ reflection features with debug information for constructor parameters.
- author
- Marek Polacek
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • c++
- • reflection
- • bugfix
- • debug
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-06-09T00:00:00.000Z
This commit addresses an Internal Compiler Error (ICE) that arose when generating debug information (-g) for C++ reflection of constructor parameters. The previous code relied on FUNCTION_FIRST_USER_PARM which could encounter a null tree because DECL_ARGUMENTS was prematurely set to NULL during compilation. The fix involves using DECL_PARM_INDEX instead to determine the parameter index, ensuring that valid parameter information is always available during reflection, even after function bodies are optimized away.