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

--- Comment #4 from Yury Gribov <ygribov at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> No the gimple is wrong.  &var is taking the address of the argument. It
> should just be var here if you what the reference points to rather than the
> address of the decl holding the pointer.

Thank you, makes sense. In that case the problem occurs at OMP lowering:
  voidD.27 copyin_simple (struct simple & restrict varD.3961)
  {
    var.0_1 = varD.3961;
    {
      D.3965.D.3963 = var.0_1;
      D.3965.varD.3964 = &varD.3961;
      #pragma omp target oacc_enter_exit_data map(to:*var.0_1 [len: 8])
map(alloc:varD.3961 [pointer assign, bias: 0])

Reply via email to