aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch9.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch9.adb')
-rw-r--r--gcc/ada/sem_ch9.adb6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch9.adb b/gcc/ada/sem_ch9.adb
index 16b8087..35c4eee 100644
--- a/gcc/ada/sem_ch9.adb
+++ b/gcc/ada/sem_ch9.adb
@@ -924,8 +924,13 @@ package body Sem_Ch9 is
UBR : Node_Id;
begin
+
+ -- No bounds checking if the type is generic or if previous error.
+ -- In an instance the check is dynamic.
+
if Is_Generic_Type (Etype (D_Sdef))
or else In_Instance
+ or else Error_Posted (D_Sdef)
then
goto Skip_LB;
@@ -951,6 +956,7 @@ package body Sem_Ch9 is
<<Skip_LB>>
if Is_Generic_Type (Etype (D_Sdef))
or else In_Instance
+ or else Error_Posted (D_Sdef)
then
goto Skip_UB;