[Ada] Fix tracking of the first item in Repinfo
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 31 May 2018 10:46:07 +0000 (10:46 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 31 May 2018 10:46:07 +0000 (10:46 +0000)
2018-05-31  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* repinfo.adb (List_Structural_Record_Layout): Set First to false
after having listed the fields of the parent type, if any.

From-SVN: r261000

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

index b485549ab72ad06b8d34ab980e9dbc9796d28360..d360f21176976c12d9c514dabde96b6aa9b3d326 100644 (file)
@@ -1,3 +1,8 @@
+2018-05-31  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * repinfo.adb (List_Structural_Record_Layout): Set First to false
+       after having listed the fields of the parent type, if any.
+
 2018-05-31  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Do not
index 874aa54d0d2a2480150c35ac88bf71059fe09a61..6c8af05993a4edfee3774be45e6c27221319ce29 100644 (file)
@@ -1517,6 +1517,7 @@ package body Repinfo is
                if Is_Extension then
                   List_Structural_Record_Layout
                     (Base_Type (Parent_Subtype (Ent)), Outer_Ent);
+                  First := False;
 
                   if Present (Record_Extension_Part (Definition)) then
                      Definition := Record_Extension_Part (Definition);