[Ada] Fix crash in GNATprove on inlined subprogram in default expression
authorYannick Moy <moy@adacore.com>
Mon, 5 Oct 2020 07:05:06 +0000 (09:05 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 24 Nov 2020 10:16:03 +0000 (05:16 -0500)
gcc/ada/

* sem_ch3.adb (Process_Discriminants): Correctly set right
context for analyzing default value of discriminant.

gcc/ada/sem_ch3.adb

index 269818afe387c76bd0256f47dcda52bc76072272..f5c7808198841b3fa7976c6d9b73aeeaf7a4863d 100644 (file)
@@ -20093,7 +20093,7 @@ package body Sem_Ch3 is
          --  Per-Object Expressions" in spec of package Sem).
 
          if Present (Expression (Discr)) then
-            Preanalyze_Spec_Expression (Expression (Discr), Discr_Type);
+            Preanalyze_Default_Expression (Expression (Discr), Discr_Type);
 
             --  Legaity checks