GNATprove analyzer for SPARK code depends on the frontend to accurately
propagate the known value of Size attribute. This was not done for
formal type parameters in generic instantiations. Now fixed.
There is no impact on compilation.
2019-08-21 Yannick Moy <moy@adacore.com>
gcc/ada/
* sem_ch3.adb (Analyze_Subtype_Declaration): Inherit RM_Size
field for formal type parameters in generic instantiations.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@274788
138bc75d-0d04-0410-961f-
82ee72b054a4
+2019-08-21 Yannick Moy <moy@adacore.com>
+
+ * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit RM_Size
+ field for formal type parameters in generic instantiations.
+
2019-08-21 Yannick Moy <moy@adacore.com>
* sem_spark.adb: Update references to the SPARK RM.
=>
Set_Ekind (Id, E_Record_Subtype);
+ -- Subtype declarations introduced for formal type parameters
+ -- in generic instantiations should inherit the Size value of
+ -- the type they rename.
+
+ if Present (Generic_Parent_Type (N)) then
+ Set_RM_Size (Id, RM_Size (T));
+ end if;
+
if Ekind (T) = E_Record_Subtype
and then Present (Cloned_Subtype (T))
then