[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.
This commit is contained in:
Piotr Trojanek 2021-10-12 17:42:05 +02:00 committed by Pierre-Marie de Rodat
parent d24e5767fe
commit ff27467280

View File

@ -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