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

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

https://gcc.gnu.org/g:3350e383b057fb7816f0f51ed6c3d36b7ca690d0

commit r16-7402-g3350e383b057fb7816f0f51ed6c3d36b7ca690d0
Author: Eric Botcazou <[email protected]>
Date:   Mon Feb 9 00:55:45 2026 +0100

    Ada: Fix bogus "potentially unsynchronized barrier" warning

    This is a regression present on the mainline and 15 branch: the compiler
    gives a bogus "potentially unsynchronized barrier" when the condition of
    an entry barrier requires the creation of a controlled temporary, because
    it comes with a transient scope that fools the test on scopes done in the
    Is_Global_Entity procedure.

    gcc/ada/
            PR ada/124025
            * exp_ch9.adb (Expand_Entry_Barrier.Is_Global_Entity): Use
            Scope_Within_Or_Same to test whether the object is local.

    gcc/testsuite/
            * gnat.dg/protected_type1.adb: New test.

    Co-authored-by: Liam Powell <[email protected]>

Reply via email to