public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/95270] New: OpenACC 'enter data attach(data_p)' fails for 'int *data_p'
@ 2020-05-22 13:22 tschwinge at gcc dot gnu.org
  2020-06-08 18:53 ` [Bug middle-end/95270] OpenACC 'enter data attach' looks up target memory object displaced by pointer size tschwinge at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2020-05-22 13:22 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95270
           Summary: OpenACC 'enter data attach(data_p)' fails for 'int
                    *data_p'
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: openacc
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org, jules at gcc dot gnu.org
  Target Milestone: ---

Created attachment 48581
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48581&action=edit
'mdc-2b_.c'

See test case attached: 'acc_attach(&data_p)' works, '#pragma enter data
attach(data_p)' doesn't.

In such a case, I suppose we either need to explicitly set 'OMP_CLAUSE_SIZE' in
all front ends, or otherwise make sure to skip/invalidate the
'gcc/gimplify.c:gimplify_scan_omp_clauses' handling:

    if (OMP_CLAUSE_SIZE (c) == NULL_TREE)
      OMP_CLAUSE_SIZE (c) = DECL_P (decl) ? DECL_SIZE_UNIT (decl)
                            : TYPE_SIZE_UNIT (TREE_TYPE (decl));

..., or elsewhere?

Given that for 'GOMP_MAP_ATTACH' etc. this is a *bias*, not a *size*, I'd like
to see this explicitly mentioned/handled in the code, under the assumption that
for 'GOMP_MAP_STRUCT'-related 'GOMP_MAP_ATTACH', we do need this set non-zero. 
Also need to update the comments in 'include/gomp-constants.h:enum
gomp_map_kind' to explain that (see 'GOMP_MAP_POINTER' example?).

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-01-09  0:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22 13:22 [Bug middle-end/95270] New: OpenACC 'enter data attach(data_p)' fails for 'int *data_p' tschwinge at gcc dot gnu.org
2020-06-08 18:53 ` [Bug middle-end/95270] OpenACC 'enter data attach' looks up target memory object displaced by pointer size tschwinge at gcc dot gnu.org
2020-06-08 19:25 ` jules at gcc dot gnu.org
2020-07-09 22:44 ` cvs-commit at gcc dot gnu.org
2020-07-13 17:14 ` cvs-commit at gcc dot gnu.org
2022-01-09  0:33 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).