[Ada] Fix internal error on renaming of equality for record type
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 28 May 2018 08:55:52 +0000 (08:55 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 28 May 2018 08:55:52 +0000 (08:55 +0000)
commitbcad5029a8e4977013d7fadc133f22fbdf8dd99d
treee28ebd67d4e1632a6d6a5af6fce99c5572a2770f
parent4fd9587f7c4b77550b6a9a1045e2687fb5d77335
[Ada] Fix internal error on renaming of equality for record type

This adjusts the previous change to the cases where the array type is not
yet frozen and, therefore, where Size_Depends_On_Discriminant is not yet
computed, by doing the computation manually.

2018-05-28  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* exp_ch4.adb (Expand_Composite_Equality): Compute whether the size
depends on a discriminant manually instead of using the predicate
Size_Depends_On_Discriminant in the array type case.

gcc/testsuite/

* gnat.dg/renaming12.adb, gnat.dg/renaming12.ads: New testcase.

From-SVN: r260839
gcc/ada/ChangeLog
gcc/ada/exp_ch4.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/renaming12.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/renaming12.ads [new file with mode: 0644]