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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
For that testcase g++.dg/gomp/adjust-args-2.C itself:
  #pragma omp dispatch
  f1(&b, &a);
makes it valid.
(Still does not solve the issue of comment 0 of accepting invalid code.)


But that test file also badly needs -fdump-tree-gimple + scan-tree-dump-times
to ensure GCC generates proper code. It currently doesn't, e.g., for:

namespace N {
  void g(C *c);
...
  N::C c;
  #pragma omp dispatch
  N::f0(&c);

which yields:
            D.3155 = __builtin_omp_get_mapped_ptr (c, D.3154);
            N::g (&D.3156);
Namely: The nonpointer 'c' is passed to omp_get_mapped_ptr (wrong: should be
'&c') – but instead of passing the resulting pointer 'D.3155' to N::g, the code
uses '&D.3156' (wrong).

* * *

Some arg passing issues will be fixed by Fortran 'adjust_args' follow up patch
(WIP, nearly ready) - but I won't add the scan-tree-dump-times to the .C file
as part of this work. - And it might not fix all issues.

(Something to re-check is also whether the reference to pointer type is handled
correctly, but it might be.)

Reply via email to