[Bug fortran/120723] [13/14/15/16 Regression][OpenACC] '!$acc ... attach(scalar)' – ICE 'unexpected pointer mapping node'

albert at tugraz dot at gcc-bugzilla@gcc.gnu.org
Tue Mar 10 22:29:56 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120723

--- Comment #2 from Christopher Albert <albert at tugraz dot at> ---
Created attachment 63881
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63881&action=edit
Proposed patch: fix scalar OpenACC attach/detach lowering

Bare scalar OpenACC attach/detach clauses were lowered through the
pointer-mapping path, producing a standalone GOMP_MAP_POINTER node that the
gimplifier rejects. This patch detects bare scalar attach/detach and emits a
direct attach operation with size zero instead. Regtested on
x86_64-pc-linux-gnu.


More information about the Gcc-bugs mailing list