2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
* lib-xref-spark_specific.adb: Minor reformatting.
* exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
2017-01-19 Tristan Gingold <gingold@adacore.com>
* fe.h (Constant_Value): Export.
From-SVN: r244628
+2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * lib-xref-spark_specific.adb: Minor reformatting.
+ * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
+
+2017-01-19 Tristan Gingold <gingold@adacore.com>
+
+ * fe.h (Constant_Value): Export.
+
2017-01-19 Javier Miranda <miranda@adacore.com>
* exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
-- The partial view of Par_Typ
begin
+ -- Do not process array types because they cannot have true parent
+ -- types. This also prevents the generation of a duplicate invariant
+ -- check when the input type is an array base type because its Etype
+ -- denotes the first subtype, both of which share the same component
+ -- type.
+
+ if Is_Array_Type (T) then
+ return;
+ end if;
+
-- Climb the parent type chain
Curr_Typ := T;
declare
Drefs_Table : Drefs.Table_Type
- renames Drefs.Table (Drefs.First .. Drefs.Last);
+ renames Drefs.Table (Drefs.First .. Drefs.Last);
begin
Xrefs.Append_All (Xrefs.Table_Type (Drefs_Table));
Nrefs := Nrefs + Drefs_Table'Length;