This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r263717 - in /trunk/gcc: ada/ChangeLog ada/exp_...
- From: pmderodat at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Tue, 21 Aug 2018 14:46:40 -0000
- Subject: r263717 - in /trunk/gcc: ada/ChangeLog ada/exp_...
Author: pmderodat
Date: Tue Aug 21 14:46:40 2018
New Revision: 263717
URL: https://gcc.gnu.org/viewcvs?rev=263717&root=gcc&view=rev
Log:
[Ada] Fix internal error on extension of record with representation clause
This fixes a long-standing issue present for extensions of tagged record
types with a representation clause: the clause is correctly inherited
for components inherited in the extension but the position and size are
not, which fools the logic of Is_Possibly_Unaligned_Object.
This can result in an attempt to take the address of a component not
aligned on a byte boundary, which is then flagged as an internal error.
2018-08-21 Eric Botcazou <ebotcazou@adacore.com>
gcc/ada/
* exp_util.adb (Is_Possibly_Unaligned_Object): For the case of a
selected component inherited in a record extension and subject
to a representation clause, retrieve the position and size from
the original record component.
gcc/testsuite/
* gnat.dg/rep_clause7.adb: New testcase.
Added:
trunk/gcc/testsuite/gnat.dg/rep_clause7.adb
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/exp_util.adb
trunk/gcc/testsuite/ChangeLog