Landing: 962723b046ae

Project / Subsystem

gcc / c

Date

2026-10-02

Author

Dominic P

Commit

962723b046ae6406c0c457bfdb76318b3652673f

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
c
patch_id
—
commit_hash
962723b046ae6406c0c457bfdb76318b3652673f
source_type
github
headline
C: Fix excess precision handling for logical NOT operator
tldr
Correctly handles excess precision for the result of the logical NOT operator (!), preventing compiler errors with types like _Float16.
author
Dominic P
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • c
  • • type handling
  • • excess precision
  • • compiler bug
discussion_id_link
—
bugzilla_pr
—
date
2026-10-02T00:00:00.000Z

This commit fixes an issue where the C frontend incorrectly re-wrapped the result of the logical NOT operator (!) in an EXCESS_PRECISION_EXPR, even though the result of ! is always an int. This caused problems with types like _Float16 or when x87 excess precision was enabled, leading to incorrect sizeof results, ICEs in build_conditional_expr, or ICEs at the expansion stage. The fix prevents re-wrapping the result of TRUTH_NOT_EXPR while still testing the operand at its excess precision.