[Ada] Spurious error on interface conversion under ZFP
commit87110162607cece08c3a1eec16d045594d07f5df
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 26 Sep 2018 09:19:04 +0000 (26 09:19 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 26 Sep 2018 09:19:04 +0000 (26 09:19 +0000)
tree9393d908821db1857849e7c1763fbecf344bdc8e
parentaf8c97e03a6d0ec3e58eba039dd040c5e9ade5d9
[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.

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