diff options
author | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-08 16:15:06 +0000 |
---|---|---|
committer | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-08 16:15:06 +0000 |
commit | 37d8f03021b8db774195e4e576067f249bbd651d (patch) | |
tree | 4fa6043235cf58bee6726c72dce924b1b6e8327f /gcc/ada/sem_res.adb | |
parent | 33c2b4c3848e3d337e01842de1b584a277c9787f (diff) | |
download | gcc-37d8f03021b8db774195e4e576067f249bbd651d.tar.gz |
* atree.adb: Set Error_Posted in Error node, helps error recovery.
* par-endh.adb (Output_End_Expected): We should also not test
Error_Posted on the Error node, since now it is always set.
* cstand.adb (Create_Standard): Set Etype of Error to Any_Type
to help error recovery. Part of general work on 9407-004.
* par.adb: Add ??? for misuse of error
* sem_res.adb:
(Resolve): Defend against Error, fixes 9407-003.
(Resolve_Discrete_Subtype_Indication): Defend against Error.
* sinfo.ads (N_Error): Now has Etype field (which will be set
to Any_Type to help error recovery).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46077 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r-- | gcc/ada/sem_res.adb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 641b120eb7b..ae2b97cb692 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- $Revision: 1.717 $ +-- $Revision$ -- -- -- Copyright (C) 1992-2001, Free Software Foundation, Inc. -- -- -- @@ -1327,6 +1327,10 @@ package body Sem_Res is -- Start of processing for Resolve begin + if N = Error then + return; + end if; + -- Access attribute on remote subprogram cannot be used for -- a non-remote access-to-subprogram type. @@ -3496,6 +3500,11 @@ package body Sem_Res is else R := Range_Expression (Constraint (N)); + + if R = Error then + return; + end if; + Analyze (R); if Base_Type (S) /= Base_Type (Typ) then |