aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/trans.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-07-08 08:13:30 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-07-08 08:13:30 +0000
commitabbc45464b1be9895a4842903a5c75b6dd085b9a (patch)
treee419d133430fef5bf2d148f717b982d56df03305 /gcc/ada/gcc-interface/trans.c
parent4962dc441d317b6f28ab4ee3bf6b0d83f7c61837 (diff)
downloadgcc-abbc45464b1be9895a4842903a5c75b6dd085b9a.zip
gcc-abbc45464b1be9895a4842903a5c75b6dd085b9a.tar.gz
gcc-abbc45464b1be9895a4842903a5c75b6dd085b9a.tar.bz2
[Ada] Fix crash on extension of private type with -gnatRj
This fixes a crash (or an assertion failure) during the processing done for -gnatRj on the declaration of an extension of a private type. Generally speaking, extension declarations are delicate in this context because the front-end does not duplicate the structure of the parent type, so the processing required to output the structural layout needs to go up to the declaration of the parent type, which may or may not be available or usable. The change also makes the processing more robust by falling back to the flat layout if the declaration of the parent type cannot be processed. 2019-07-08 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * repinfo.adb (List_Record_Info): Declare Incomplete_Layout and Not_In_Extended_Main local exceptions. (List_Structural_Record_Layout): For an extension, raise the former if the parent subtype has not been built and the latter if it is not declared in the main source unit. Fall back to the flat layout if either exception has been raised. From-SVN: r273206
Diffstat (limited to 'gcc/ada/gcc-interface/trans.c')
0 files changed, 0 insertions, 0 deletions