* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135979
138bc75d-0d04-0410-961f-
82ee72b054a4
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;