From 4f94320340e621e0b32e26f5e5b4d8883c7f8241 Mon Sep 17 00:00:00 2001 From: Yannick Moy Date: Mon, 5 Oct 2020 09:05:06 +0200 Subject: [PATCH] [Ada] Fix crash in GNATprove on inlined subprogram in default expression gcc/ada/ * sem_ch3.adb (Process_Discriminants): Correctly set right context for analyzing default value of discriminant. --- gcc/ada/sem_ch3.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 269818afe38..f5c78081988 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -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