Landing: 40f7fbeddb13

Project / Subsystem

gcc / gcc

Date

2026-09-01

Author

Richard Biener

Commit

40f7fbeddb1333e2787f0edd522d1dcd07ff5b0a

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc
patch_id
—
commit_hash
40f7fbeddb1333e2787f0edd522d1dcd07ff5b0a
source_type
github
headline
Avoid uninitialized diagnostic in vect_get_num_copies_for_invariant
tldr
Fixes a potential uninitialized variable issue in the vectorization pass.
author
Richard Biener
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • gcc
  • • vectorization
  • • diagnostics
discussion_id_link
—
bugzilla_pr
—
date
2026-09-01T00:00:00.000Z

The vectorization pass in GCC could sometimes lead to an uninitialized diagnostic being reported due to how it handled return values from vect_get_num_copies_for_invariant. This change refactors the code within that function to ensure that the rem variable is not accessed when the function returns false, thus preventing the uninitialized data from being stored and subsequently used.