r267006 - in /trunk/gcc: ada/ChangeLog ada/exp_...

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Tue Dec 11 11:11:00 GMT 2018


Author: pmderodat
Date: Tue Dec 11 11:11:37 2018
New Revision: 267006

URL: https://gcc.gnu.org/viewcvs?rev=267006&root=gcc&view=rev
Log:
[Ada] Plug small loophole with pathological packed array type

This fixes a crash in gigi on a pathological packed array type, whose
component type is a record type without representation clause or packing
but with a clause that bumps its size to a non-multiple value of the
storage unit.  In this case, the front-end fails to detect that calls
to the packing manpulation routines of the run time are necessary.

The fix doesn't change anything for non-pathological cases, i.e. when
the component type has a representation clause or is packed.

2018-12-11  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* exp_aggr.adb (Packed_Array_Aggregate_Handled): Bail out for
	any non-scalar type as component type of the array.

gcc/testsuite/

	* gnat.dg/packed_array.adb, gnat.dg/packed_array.ads,
	gnat.dg/packed_array_pkg.ads: New testcase.

Added:
    trunk/gcc/testsuite/gnat.dg/packed_array.adb
    trunk/gcc/testsuite/gnat.dg/packed_array.ads
    trunk/gcc/testsuite/gnat.dg/packed_array_pkg.ads
Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/exp_aggr.adb
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list