https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108610
--- 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:a8329c92a4f0554a13eaa75b1323d4ba4dcdd4fd commit r17-6587-ga8329c92a4f0554a13eaa75b1323d4ba4dcdd4fd Author: Eric Botcazou <[email protected]> Date: Mon Nov 23 09:28:13 2026 +0100 Ada: Fix pure library procedure with limited parameters miscategorized The problem is that a pragma Pure present either on the containing library package or on a library subprogram itself does not necessarily imply that the Is_Pure flag is set on the subprogram entity, the discrepancy coming from the Sem_Util.Check_Function_With_Address_Parameter routine. This is a minimal fix because it's really a corner case. gcc/ada/ PR ada/108610 * sem_cat.adb (Get_Categorization): Always return Pure if a pragma Pure is present on the unit. gcc/testsuite/ * gnat.dg/pure_subp_body2a.adb: New test. * gnat.dg/pure_subp_body2b.adb: New helper subprogram. * gnat.dg/pure_subp_body2_pkg.ads: New helper package.
