Landing: 89b2fa7a74ef
Project / Subsystem
gcc / lto.cc
Date
2026-09-16
Author
Tobias Burnus
Commit
89b2fa7a74ef1f7b8f0f8f1abc3bbc412d59302a
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- lto.cc
- patch_id
- —
- commit_hash
- 89b2fa7a74ef1f7b8f0f8f1abc3bbc412d59302a
- source_type
- github
- headline
- lto.cc: Fix OpenMP offload_handle_link_vars for global variables
- tldr
- Corrects a bug in OpenMP offload handling that caused functions to be called twice, potentially leading to incorrect global variable processing.
- author
- Tobias Burnus
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • lto
- • openmp
- • optimization
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-16T00:00:00.000Z
This commit fixes an issue in the LTO (Link-Time Optimization) component where the offload_handle_link_vars function was called twice for OpenMP offloads. The previous fix, intended to address renaming issues with static variables, inadvertently left the original call intact. This change removes the duplicated call and adjusts the processing order within offload_handle_link_vars to correctly handle global variables by ensuring declaration finalization occurs after iterating through the variable pool.