From: Eric Botcazou Date: Tue, 5 May 2020 14:09:33 +0000 (+0200) Subject: [Ada] Remove obsolete code in Eval_Attribute X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c54077e4538c8745abecb0c440a26573e708e100;p=gcc.git [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. --- 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;