From: Piotr Trojanek Date: Mon, 4 May 2020 17:14:19 +0000 (+0200) Subject: [Ada] Remove special case for processing null range in GNATprove X-Git-Tag: basepoints/gcc-12~6432 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eddd728f5f832869596529490f5db019ee899d53;p=thirdparty%2Fgcc.git [Ada] Remove special case for processing null range in GNATprove gcc/ada/ * sem_res.adb (Resolve_Range): Resolve both low and high bounds with the range type. --- diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 46f140932b8d..5c75a3b2aab3 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -10257,13 +10257,8 @@ package body Sem_Res is begin Set_Etype (N, Typ); - -- The lower bound should be in Typ. The higher bound can be in Typ's - -- base type if the range is null. It may still be invalid if it is - -- higher than the lower bound. This is checked later in the context in - -- which the range appears. - Resolve (L, Typ); - Resolve (H, Base_Type (Typ)); + Resolve (H, Typ); -- Reanalyze the lower bound after both bounds have been analyzed, so -- that the range is known to be static or not by now. This may trigger