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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <[email protected]>:

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

commit r17-6626-gc4c2ef43206f33a3abf08f5b59a8795f5d5256a1
Author: Tobias Burnus <[email protected]>
Date:   Tue Nov 24 03:43:28 2026 +0100

    OpenMP: Fix Fortran mapping of allocatable comps of global variables
[PR128969]

    The scan_sharing_clauses function also takes care of ensuring the struct
    that handles the 'addrs' argument for mapping also has space for Fortran's
    deep mapping of allocatable components.
    However, setting the flex_array_ptr boolean, which required for this,
failed
    for global variables as those returned early. The solution is to reorder
the
    if blocks.

            PR fortran/128969

    gcc/ChangeLog:

            * omp-low.cc (scan_sharing_clauses): Reorder 'if' blocks to handle
            allocatable components of global variables.

    libgomp/ChangeLog:

            * testsuite/libgomp.fortran/map-static-alloc-comp-1.f90: New test.

Reply via email to