[Ada] More complete information level for -gnatR4 output
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 22 Jul 2019 13:58:41 +0000 (13:58 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 22 Jul 2019 13:58:41 +0000 (13:58 +0000)
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;

2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* repinfo.adb (List_Entities): Also list compiled-generated
types present as Etype of objects.

From-SVN: r273697

gcc/ada/ChangeLog
gcc/ada/repinfo.adb

index 26af730c6e31832d3763eb7970f9b7b2cf136273..db77736f321a54fa9f32579b0f056982ece2dd88 100644 (file)
@@ -1,3 +1,8 @@
+2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * repinfo.adb (List_Entities): Also list compiled-generated
+       types present as Etype of objects.
+
 2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>
 
        * sinfo.ads: Update the documentation about the
index c378fb634a2c670ba96e72ddaf1901370d94ba84..a277bab6cdf9994deed68fff133e1430631dc9cd 100644 (file)
@@ -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;