Landing: fc6e5cca8dac

Project / Subsystem

gcc / gcc

Date

2025-12-16

Author

Andrew MacLeod

Commit

fc6e5cca8dace4b539bc3b7857daa806b50fc139

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc
patch_id
commit_hash
fc6e5cca8dace4b539bc3b7857daa806b50fc139
source_type
github
headline
`range_of_expr` Handles No Context Without Crashing
tldr
Fixes a crash in `range_of_expr` when called without a statement context, ensuring global value ranges are properly returned.
author
Andrew MacLeod
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • bugfix
  • range analysis
discussion_id_link
bugzilla_pr
date
2025-12-16T00:00:00.000Z

The range_of_expr function in GCC, which is responsible for determining the range of possible values for an expression, was crashing when called without a statement context. This commit fixes the crash by handling the case where no statement context is provided, ensuring that the function returns a global value range as intended.