From: Piotr Trojanek Date: Tue, 12 Oct 2021 15:42:05 +0000 (+0200) Subject: [Ada] Prevent use of an uninitialized AST field with universal integer X-Git-Tag: basepoints/gcc-13~3773 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff2746728050429684bf62729df798189cc1d396;p=thirdparty%2Fgcc.git [Ada] Prevent use of an uninitialized AST field with universal integer gcc/ada/ * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Guard against equality of an uninitialized RM_Size field. --- diff --git a/gcc/ada/exp_spark.adb b/gcc/ada/exp_spark.adb index bbfee6229690..bce745b2690f 100644 --- a/gcc/ada/exp_spark.adb +++ b/gcc/ada/exp_spark.adb @@ -451,6 +451,7 @@ package body Exp_SPARK is Apply_Universal_Integer_Attribute_Checks (N); if Present (Typ) + and then Known_RM_Size (Typ) and then RM_Size (Typ) = RM_Size (Standard_Long_Long_Integer) then -- ??? This should rather be a range check, but this would