From: Justin Squirek Date: Tue, 6 Oct 2020 19:01:15 +0000 (-0400) Subject: [Ada] Compiler crash on assertion pragma in ghost region X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=78004c41f7830fcef5bdefeec8edad6737c2af1a;p=gcc.git [Ada] Compiler crash on assertion pragma in ghost region gcc/ada/ * sem_prag.adb (Analyze_Pragma): Mark relevant pragmas as ghost when they are within a ghost region. --- diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 8e36976bc9f..a46f52f0838 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -11437,6 +11437,12 @@ package body Sem_Prag is end if; end if; + -- Mark assertion pragmas as Ghost depending on their enclosing context + + if Assertion_Expression_Pragma (Prag_Id) then + Mark_Ghost_Pragma (N, Current_Scope); + end if; + -- Preset arguments Arg_Count := 0;