]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Crash on interface equality covered by a renaming declaration
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Nov 2018 11:42:10 +0000 (11:42 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Nov 2018 11:42:10 +0000 (11:42 +0000)
commit8b71a75f48608291322e10aadc02a20b58ae26b7
treebdbf608da71836e0a46d5adad0020c4da73b5d95
parent149a4b48882d701f5947bcad565b443f7dc862a6
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266130 138bc75d-0d04-0410-961f-82ee72b054a4
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]