Landing: f108e23d2bff

Project / Subsystem

gcc / gcc/tree-cfg

Date

2026-05-14

Author

Andrew Pinski

Commit

f108e23d2bff50d0ee8cf0d25a08be5432b702b6

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc/tree-cfg
patch_id
commit_hash
f108e23d2bff50d0ee8cf0d25a08be5432b702b6
source_type
github
headline
tree-cfg: Revert code that incorrectly removed case labels
tldr
GCC has reverted a change that incorrectly removed case labels, fixing optimizations and a switch statement issue.
author
Andrew Pinski
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • optimization
  • cfg
  • revert
  • bugfix
discussion_id_link
github:gcc-mirror/gcc#125290
bugzilla_pr
date
2026-05-14T00:00:00.000Z

A previous commit (r8-546) introduced code to remove case statements that directly lead to __builtin_unreachable. However, this change caused loss of optimization in some cases and resulted in switch statements with only a default case. This commit reverts the problematic part of r8-546, restoring the original behavior and fixing regressions and also addresses PR 125290 by preventing creation of switch statements with only a default case.