This instructs -gnatR4 to also list the Etype of user-declared objects
if it is compiler-generated, for example in:
package P2 is
Arr_V : array (1 .. 5) of Integer;
end P2;
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-07-22 Eric Botcazou <ebotca...@adacore.com>
gcc/ada/
* repinfo.adb (List_Entities): Also list compiled-generated
types present as Etype of objects.
--- gcc/ada/repinfo.adb
+++ gcc/ada/repinfo.adb
@@ -563,6 +563,13 @@ package body Repinfo is
E_Loop_Parameter,
E_Variable)
then
+ -- The type is relevant for an object
+
+ if List_Representation_Info = 4 and then Is_Itype (Etype (E))
+ then
+ Relevant_Entities.Set (Etype (E), True);
+ end if;
+
if List_Representation_Info >= 2 then
List_Object_Info (E);
end if;