aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/repinfo.adb
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2018-05-28 08:53:13 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-05-28 08:53:13 +0000
commitc8e95568a1fa2957eca057c659497aed2b58bfd3 (patch)
tree7220c643532ca5e35fed764a54d814d0b6f84c44 /gcc/ada/repinfo.adb
parent500b21ddb7ff3546e9b7f100b7414347661c7fb9 (diff)
downloadgcc-c8e95568a1fa2957eca057c659497aed2b58bfd3.zip
gcc-c8e95568a1fa2957eca057c659497aed2b58bfd3.tar.gz
gcc-c8e95568a1fa2957eca057c659497aed2b58bfd3.tar.bz2
[Ada] Minor tweak to output of -gnatR
This changes the output of -gnatR for extensions of tagged record types to avoid displaying the internal _Parent component, which overlaps with other components and is thus more confusing than helpful. For the following hierarchy: type R1 is tagged record I : Integer; end record; type R2 is new R1 with record C : Character; end record; the output -gnatR must now be: for R1'Object_Size use 128; for R1'Value_Size use 96; for R1'Alignment use 8; for R1 use record _Tag at 0 range 0 .. 63; I at 8 range 0 .. 31; end record; for R2'Object_Size use 192; for R2'Value_Size use 136; for R2'Alignment use 8; for R2 use record _Tag at 0 range 0 .. 63; I at 8 range 0 .. 31; C at 16 range 0 .. 7; end record; 2018-05-28 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * repinfo.adb (Compute_Max_Length): Skip _Parent component. (List_Record_Layout): Likewise. From-SVN: r260819
Diffstat (limited to 'gcc/ada/repinfo.adb')
-rw-r--r--gcc/ada/repinfo.adb12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/repinfo.adb b/gcc/ada/repinfo.adb
index 07c034b..38b2334 100644
--- a/gcc/ada/repinfo.adb
+++ b/gcc/ada/repinfo.adb
@@ -915,6 +915,12 @@ package body Repinfo is
goto Continue;
end if;
+ -- Skip _Parent component in extension (to avoid overlap)
+
+ if Chars (Comp) = Name_uParent then
+ goto Continue;
+ end if;
+
-- All other cases
declare
@@ -1010,6 +1016,12 @@ package body Repinfo is
goto Continue;
end if;
+ -- Skip _Parent component in extension (to avoid overlap)
+
+ if Chars (Comp) = Name_uParent then
+ goto Continue;
+ end if;
+
-- All other cases
declare