[Ada] Spurious error on interface conversion under ZFP
authorJavier Miranda <miranda@adacore.com>
Wed, 26 Sep 2018 09:19:04 +0000 (09:19 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 26 Sep 2018 09:19:04 +0000 (09:19 +0000)
commit2d9c4206c9d18b39f4d1c87ddbbda75238b7bf19
tree9393d908821db1857849e7c1763fbecf344bdc8e
parent9d9518668b8b908825b28697bf5e2a866ae00e8e
[Ada] Spurious error on interface conversion under ZFP

The frontend reports an error under ZFP when performing the type
conversion of a tagged object to one of its covered interface types.

2018-09-26  Javier Miranda  <miranda@adacore.com>

gcc/ada/

* exp_disp.adb (Expand_Interface_Conversion): No displacement of
the pointer needed when the type of the operand is an interface
type that maches the target type and we are compiling under
configurable runtime. Adding also documentation explaining why
this cannot be done when compiling with the full runtime.
* exp_intr.adb: Update comment.

gcc/testsuite/

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

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