From c54077e4538c8745abecb0c440a26573e708e100 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 5 May 2020 16:09:33 +0200 Subject: [PATCH] [Ada] Remove obsolete code in Eval_Attribute gcc/ada/ * sem_attr.adb (Eval_Attribute): Do not apply range checks in the case of 'Pos applied to an integer type here. --- gcc/ada/sem_attr.adb | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 5041a122414..81130b59c29 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -8354,16 +8354,6 @@ package body Sem_Attr is if not Compile_Time_Known_Value (E) or else not Is_Scalar_Type (Etype (E)) then - -- An odd special case, if this is a Pos attribute, this - -- is where we need to apply a range check since it does - -- not get done anywhere else. - - if Id = Attribute_Pos then - if Is_Integer_Type (Etype (E)) then - Apply_Range_Check (E, Etype (N)); - end if; - end if; - Check_Expressions; return; -- 2.30.2