aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-generic.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2018-05-28 08:54:55 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-05-28 08:54:55 +0000
commit0c386027b7d086f4d8e0b7f5a3778db1d08e6a29 (patch)
treed597f254e7673fe8aaa665831c430e8809d697a0 /gcc/tree-vect-generic.c
parentc84205cd4fb4122a092207542c55a92b62bcb314 (diff)
downloadgcc-0c386027b7d086f4d8e0b7f5a3778db1d08e6a29.zip
gcc-0c386027b7d086f4d8e0b7f5a3778db1d08e6a29.tar.gz
gcc-0c386027b7d086f4d8e0b7f5a3778db1d08e6a29.tar.bz2
[Ada] Fix internal error on nested record types with representation clause
This fixes a long-standing issue with the expansion of equality functions generated for discriminated record types with variant part. In this case the front-end recursively expands equality functions for the composite sub-components, in particular the array sub-components. But it systematically uses the unconstrained base type for them, which leads to both a more complex equality function, because of the need to compare the bounds, and an additional unchecked conversion from type to base type. Now this unchecked conversion may block a further expansion of the array sub-component, for example if it is a large array of record types subject to a component clause that causes it not to start on a byte boundary, and thus may lead to an internal error downstream in the back-end. 2018-05-28 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_ch4.adb (Expand_Composite_Equality): For a composite (or FP) component type, do not expand array equality using the unconstrained base type, except for the case where the bounds of the type depend on a discriminant. gcc/testsuite/ * gnat.dg/rep_clause6.adb, gnat.dg/rep_clause6.ads: New testcase. From-SVN: r260834
Diffstat (limited to 'gcc/tree-vect-generic.c')
0 files changed, 0 insertions, 0 deletions