Landing: 58925a5a1305

Project / Subsystem

gcc / openmp

Date

2026-07-15

Author

Thomas Schwinge

Commit

58925a5a130561aa89fd20ea4f731f2c73384b2e

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
openmp
patch_id
commit_hash
58925a5a130561aa89fd20ea4f731f2c73384b2e
source_type
github
headline
OpenMP: Fix memory access faults for non-USM offloads with 'nohost'
tldr
Corrects OpenMP's 'nohost' target handling to prevent memory access faults in non-USM offloads.
author
Thomas Schwinge
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • openmp
  • offloading
  • gpu
  • memory access
  • bugfix
discussion_id_link
bugzilla_pr
date
2026-07-15T00:00:00.000Z

This change fixes a memory access fault occurring during OpenMP offloading when device_type(nohost) is used with non-Unified Shared Memory (non-USM) offloads. The issue manifested as a ‘Page not present’ error on AMD GPUs or an ‘illegal memory access’ on NVIDIA GPUs. The solution involves mapping the variable ‘x’ for the OpenMP ‘target’ construct, ensuring that data is correctly accessible on the device for non-USM scenarios.