[Ada] Crash on interface equality covered by a renaming declaration
authorJavier Miranda <miranda@adacore.com>
Wed, 14 Nov 2018 11:42:10 +0000 (11:42 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 14 Nov 2018 11:42:10 +0000 (11:42 +0000)
commit4faf522bacd66cd03826c645b30c68f0fd785177
treebdbf608da71836e0a46d5adad0020c4da73b5d95
parentb6eb7548cf927d541477146a195e2bdd25900012
[Ada] Crash on interface equality covered by a renaming declaration

The frontend crashes processing a tagged type that implements an
interface which has an equality primitive (that is, "=") and covers such
primitive by means of a renaming declaration.

2018-11-14  Javier Miranda  <miranda@adacore.com>

gcc/ada/

* exp_disp.adb (Expand_Interface_Thunk): Extend handling of
renamings of the predefined equality primitive.
(Make_Secondary_DT): When calling Expand_Interface_Thunk() pass
it the primitive, instead of its Ultimate_Alias; required to
allow the called routine to identify renamings of the predefined
equality operation.

gcc/testsuite/

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

From-SVN: r266130
gcc/ada/ChangeLog
gcc/ada/exp_disp.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/equal5.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/equal5.ads [new file with mode: 0644]