Landing: 5d7c74258d3a

Project / Subsystem

gcc / gcc/tree-optimization

Date

2026-07-03

Author

Philipp Tomsich

Commit

5d7c74258d3a4b95cd5022acd5fa51381d922a40

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc/tree-optimization
patch_id
commit_hash
5d7c74258d3a4b95cd5022acd5fa51381d922a40
source_type
github
headline
Use target-independent types for carry overflow checks
tldr
Ensures target-independent carry overflow checks by using predefined width types.
author
Philipp Tomsich
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • gcc
  • compiler
  • optimization
discussion_id_link
bugzilla_pr
date
2026-07-03T00:00:00.000Z

The uns_carry() helper function in GCC’s tree-optimization passes previously used fixed-width types (unsigned int and unsigned long) for its narrow and wide type comparisons. This commit modifies the helper to use __UINT32_TYPE__ and __UINT64_TYPE__ instead. This change makes the comparison target-independent, resolving issues on ILP32 (32-bit) targets where unsigned long might not be wider than unsigned int, ensuring the test suite accurately reflects carry behavior across different architectures.