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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <bur...@gcc.gnu.org>:

https://gcc.gnu.org/g:c99cdcab4f1c497a872cf552138fd8ea27e9a5eb

commit r15-2472-gc99cdcab4f1c497a872cf552138fd8ea27e9a5eb
Author: Tobias Burnus <tbur...@baylibre.com>
Date:   Thu Aug 1 09:06:32 2024 +0200

    omp-offload.cc: Fix value-expr handling of 'declare target link' vars
[PR115637]

    As the PR and included testcase shows, replacing 'arr2' by its value
expression
    '*arr2$13$linkptr' failed for
      MEM <uint128_t> [(c_char * {ref-all})&arr2]
    which left 'arr2' in the code as unknown symbol. Now expand the value
expression
    already in pass_omp_target_link::execute's process_link_var_op
walk_gimple_stmt
    walk - and don't rely on gimple_regimplify_operands.

            PR middle-end/115637

    gcc/ChangeLog:

            * gimplify.cc (gimplify_body): Fix macro name in the comment.
            * omp-offload.cc (find_link_var_op): Rename to ...
            (process_link_var_op): ... this. Replace value expr.
            (pass_omp_target_link::execute): Update walk_gimple_stmt call.

    libgomp/ChangeLog:

            * testsuite/libgomp.fortran/declare-target-link.f90: Uncomment
            now working code.

    Co-authored-by: Richard Biener <rguent...@suse.de

Reply via email to