diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 269818afe387..f5c780819884 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