Landing: 388aada52115

Project / Subsystem

gcc / gcc/tree-optimization

Date

2026-09-09

Author

Richard Biener

Commit

388aada52115970d85926c07072aeb7fce4498e7

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc/tree-optimization
patch_id
—
commit_hash
388aada52115970d85926c07072aeb7fce4498e7
source_type
github
headline
Fix ICE with switch statement uninitialized variable warnings
tldr
GCC now correctly converts switch label types to match the switch index type, resolving an internal compiler error.
author
Richard Biener
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • compiler-error
  • • optimization
discussion_id_link
—
bugzilla_pr
—
date
2026-09-09T00:00:00.000Z

An internal compiler error (ICE) occurred when the type of switch indices and case labels differed, particularly when uninitialized variable warnings were enabled. This change modifies gimple-predicate-analysis.cc to convert case label values to the type of the switch index, thus ensuring type consistency. A new test case pr127262.c is added to verify the fix.