From: Gary Dismukes Date: Tue, 27 May 2008 08:50:04 +0000 (+0200) Subject: sem_ch3.adb (Fixup_Bad_Constraint): Set the Etype on the bad subtype to the known... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=491016e57014542fa5f69d27d2c944c5c6bd5289;p=gcc.git sem_ch3.adb (Fixup_Bad_Constraint): Set the Etype on the bad subtype to the known type entity E... 2008-05-27 Gary Dismukes * sem_ch3.adb (Fixup_Bad_Constraint): Set the Etype on the bad subtype to the known type entity E, rather than setting it to Any_Type. Fixes possible blowup in function Base_Init_Proc, as called from Freeze_Entity for objects whose type had an illegal constraint. From-SVN: r135979 --- diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index a3f036ade25..9fb7e944b2b 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -10186,7 +10186,9 @@ package body Sem_Ch3 is Set_Ekind (Def_Id, Subtype_Kind (Ekind (T))); end if; - Set_Etype (Def_Id, Any_Type); + -- Set Etype to the known type, to reduce chances of cascaded errors + + Set_Etype (Def_Id, E); Set_Error_Posted (Def_Id); end Fixup_Bad_Constraint;