Landing: 800227516cf3

Project / Subsystem

gcc / gcc/fortran/openmp

Date

2026-06-10

Author

Chung-Lin Tang

Commit

800227516cf3d407ef17e7206b8bebe2d29f4dc1

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc/fortran/openmp
patch_id
commit_hash
800227516cf3d407ef17e7206b8bebe2d29f4dc1
source_type
github
headline
Fortran OpenMP correctly handles POINTER array privatization.
tldr
Fortran `POINTER` attribute arrays with OpenMP `firstprivate` clauses now correctly maintain their association status instead of being deep-copied.
author
Chung-Lin Tang
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • fortran
  • openmp
  • bugfix
  • parallelism
discussion_id_link
bugzilla_pr
date
2026-06-10T00:00:00.000Z

This commit corrects an issue where Fortran arrays with the POINTER attribute were deep-copied when used with an OpenMP firstprivate clause, instead of having their association status preserved. A new language hook, omp_array_data_privatize, differentiates these cases during OpenMP lowering. This ensures compliance with the OpenMP specification for POINTER variables, where new list items should receive the same association status as the original.