]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/ada/ChangeLog
[Ada] Crash in interface derivation with null primitive
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Jul 2019 08:13:20 +0000 (08:13 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Jul 2019 08:13:20 +0000 (08:13 +0000)
commitc98aac61bd4b038c3b5786da26431a3fda4a7f31
tree35a93152f966dad625f9964c1d9d8ff0c426597f
parent221b67b6b14a3358c92dd3f3187e772705fc98a3
[Ada] Crash in interface derivation with null primitive

The frontend crashes processing the derivation of a tagged type whose
ultimate ancestor is an interface type I1 that has a null primitive,
implements another interface I2 derived from I2, and does not override
the null primitive.

2019-07-08  Javier Miranda  <miranda@adacore.com>

gcc/ada/

* exp_disp.adb (Register_Primitive): When registering a
primitive in the secondary dispatch table, handle primitive
inherited through several levels of type derivation (required to
properly handle inherited 'null' primitive).

gcc/testsuite/

* gnat.dg/interface9.adb, gnat.dg/interface9_root-child.ads,
gnat.dg/interface9_root.ads: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@273204 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/exp_disp.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/interface9.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/interface9_root-child.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/interface9_root.ads [new file with mode: 0644]