Commit 76ccee8f by Eric Botcazou Committed by Pierre-Marie de Rodat

[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
parent f2a35a2f
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> 2019-08-20 Bob Duff <duff@adacore.com>
* sem_eval.adb (Expr_Value): Implement the case of an unchecked * sem_eval.adb (Expr_Value): Implement the case of an unchecked
......
...@@ -1681,6 +1681,15 @@ package body Repinfo is ...@@ -1681,6 +1681,15 @@ package body Repinfo is
Write_Eol; Write_Eol;
Write_Line ("}"); Write_Line ("}");
end if; 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; end List_Record_Info;
------------------- -------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment