https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124025
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Eric Botcazou <[email protected]>: https://gcc.gnu.org/g:f5e6e82a5ffb929d25e4f3288ef9b233dcff7b46 commit r15-10803-gf5e6e82a5ffb929d25e4f3288ef9b233dcff7b46 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]>
