This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r273206 - in /trunk/gcc/ada: ChangeLog repinfo.adb
- From: pmderodat at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Mon, 08 Jul 2019 08:13:30 -0000
- Subject: r273206 - in /trunk/gcc/ada: ChangeLog repinfo.adb
Author: pmderodat
Date: Mon Jul 8 08:13:30 2019
New Revision: 273206
URL: https://gcc.gnu.org/viewcvs?rev=273206&root=gcc&view=rev
Log:
[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.
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/repinfo.adb