]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix invalid JSON for extended variant record with -gnatRj
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 4 Jan 2023 15:41:47 +0000 (16:41 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 15 May 2023 09:36:41 +0000 (11:36 +0200)
commita372273b63b17c843e93bb179c8e56a270dd9e40
treebc99c91725a622dc6b06757c0af23e1ffccaef2b
parentf959a78b0d26513cd0802ac1402adc4ebdd4db67
ada: Fix invalid JSON for extended variant record with -gnatRj

This fixes the output of -gnatRj for an extension of a tagged type which has
a variant part and also deals with the case where the parent type is private
with unknown discriminants.

gcc/ada/

* repinfo.ads (JSON output format): Document special case of
Present member of a Variant object.
* repinfo.adb (List_Structural_Record_Layout): Change the type of
Ext_Level parameter to Integer. Restrict the first recursion with
increasing levels to the fixed part and implement a second
recursion with decreasing levels for the variant part. Deal with
an extension of a type with unknown discriminants.
gcc/ada/repinfo.adb
gcc/ada/repinfo.ads