Landing: 45e402c8ad5c

Project / Subsystem

gcc / openmp

Date

2026-09-22

Author

Chung-Lin Tang

Commit

45e402c8ad5cd260d1fe34ae27630625fc8ee098

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
openmp
patch_id
—
commit_hash
45e402c8ad5cd260d1fe34ae27630625fc8ee098
source_type
github
headline
OpenMP: Implement local clause for declare target
tldr
Adds 'local' clause support to OpenMP's 'declare target' directive for offloaded code.
author
Chung-Lin Tang
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • openmp
  • • offloading
  • • gpu
  • • parallelism
  • • declare target
discussion_id_link
—
bugzilla_pr
—
date
2026-09-22T00:00:00.000Z

This patch implements the ‘local’ clause for the OpenMP declare target directive. This new clause allows variables to have non-associated versions on the host and device, preventing them from being automatically managed by the offloading machinery. When a ‘local’ variable is modified on the GPU, omp target update will not work as expected, confirming its local scope. This feature is integrated by extending the existing declare target attribute handling in the front-ends.