aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-08-20 09:49:28 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-08-20 09:49:28 +0000
commit76ccee8fc7a60a19578e1901d431d628eb0214a9 (patch)
tree0a3bce79bddaf34e1d8dbf0baaf5334eb226999f /gcc
parentf2a35a2fe4a6fef35de549c3aaff120e110cceb8 (diff)
downloadgcc-76ccee8fc7a60a19578e1901d431d628eb0214a9.zip
gcc-76ccee8fc7a60a19578e1901d431d628eb0214a9.tar.gz
gcc-76ccee8fc7a60a19578e1901d431d628eb0214a9.tar.bz2
[Ada] More complete information level for -gnatR4 output
This instructs -gnatR4 to also list the Etype of a user-declared record subtype if it is compiler-generated, for example in: package P is type U_Arr is array (Integer range <>) of Character; type Rec1 (D1, D2 : Integer) is record C : U_Arr (D1 .. D2); end record; type Rec_N is new Rec1 (1, 2); end P; 2019-08-20 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * repinfo.adb (List_Record_Info): In -gnatR4 mode, set the relevant flag on the implicit base type of a record subtype. From-SVN: r274727
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/repinfo.adb9
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index e9a8e79..82dd6a1 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2019-08-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ * repinfo.adb (List_Record_Info): In -gnatR4 mode, set the
+ relevant flag on the implicit base type of a record subtype.
+
2019-08-20 Bob Duff <duff@adacore.com>
* sem_eval.adb (Expr_Value): Implement the case of an unchecked
diff --git a/gcc/ada/repinfo.adb b/gcc/ada/repinfo.adb
index 6f531b2..0f318a0 100644
--- a/gcc/ada/repinfo.adb
+++ b/gcc/ada/repinfo.adb
@@ -1681,6 +1681,15 @@ package body Repinfo is
Write_Eol;
Write_Line ("}");
end if;
+
+ -- The type is relevant for a record subtype
+
+ if List_Representation_Info = 4
+ and then not Is_Base_Type (Ent)
+ and then Is_Itype (Etype (Ent))
+ then
+ Relevant_Entities.Set (Etype (Ent), True);
+ end if;
end List_Record_Info;
-------------------