https://gcc.gnu.org/g:03286f6873272bfb777b1a4282af28c824f93cf0
commit r16-3690-g03286f6873272bfb777b1a4282af28c824f93cf0 Author: Viljar Indus <[email protected]> Date: Wed Jul 30 12:34:13 2025 +0300 ada: Avoid performing policy checks on ignored ghost pragmas These pragamas are already disabled if the relative ghost entity is disabled. gcc/ada/ChangeLog: * ghost.adb (Is_OK_Pragma): mark the context of ignored ghost pragmas as OK. Diff: --- gcc/ada/ghost.adb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/ada/ghost.adb b/gcc/ada/ghost.adb index 574f7f2cda40..695970fbdd2e 100644 --- a/gcc/ada/ghost.adb +++ b/gcc/ada/ghost.adb @@ -453,6 +453,13 @@ package body Ghost is return False; end if; + -- if the entitiy associated with the pragma is ignored then we do + -- not need to analyze the pragma. + + if Is_Ignored_Ghost_Pragma (Prag) then + return True; + end if; + Prag_Id := Get_Pragma_Id (Prag); Prag_Nam := Original_Aspect_Pragma_Name (Prag);
