summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-27 08:50:04 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-27 08:50:04 +0000
commit3b168b3ae3531268dfd7d97ecd6ccc32cb841a20 (patch)
treecc84d84cd3df9c42fd27fb77354cf4e22757f942
parenta735d663a439ee76661cc10a189daa162e049d13 (diff)
downloadppe42-gcc-3b168b3ae3531268dfd7d97ecd6ccc32cb841a20.tar.gz
ppe42-gcc-3b168b3ae3531268dfd7d97ecd6ccc32cb841a20.zip
2008-05-27 Gary Dismukes <dismukes@adacore.com>
* 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
-rw-r--r--gcc/ada/sem_ch3.adb4
1 files changed, 3 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud