diff options
author | Javier Miranda <miranda@adacore.com> | 2019-08-13 08:08:27 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-08-13 08:08:27 +0000 |
commit | 5b15ac5f0506f3d9c1cf0913024e1c721521f7c0 (patch) | |
tree | 016e9d2753a59ec6aa29897d62c9cb658d79c36e /gcc/config.gcc | |
parent | 5efb7125030aab3e2622be6de7fbbb18ddfadc8f (diff) | |
download | gcc-5b15ac5f0506f3d9c1cf0913024e1c721521f7c0.zip gcc-5b15ac5f0506f3d9c1cf0913024e1c721521f7c0.tar.gz gcc-5b15ac5f0506f3d9c1cf0913024e1c721521f7c0.tar.bz2 |
[Ada] Wrong dispatching call in type with aspect Implicit_Dereference
When a record type with an an access to class-wide type discriminant
has aspect Implicit_Dereference, and the discriminant is used as the
controlling argument of a dispatching call, the compiler may generate
wrong code to dispatch the call.
2019-08-13 Javier Miranda <miranda@adacore.com>
gcc/ada/
* sem_res.adb (Resolve_Selected_Component): When the type of the
component is an access to a class-wide type and the type of the
context is an access to a tagged type the relevant type is that
of the component (since in such case we may need to generate
implicit type conversions or dispatching calls).
gcc/testsuite/
* gnat.dg/tagged3.adb, gnat.dg/tagged3_pkg.adb,
gnat.dg/tagged3_pkg.ads: New testcase.
From-SVN: r274356
Diffstat (limited to 'gcc/config.gcc')
0 files changed, 0 insertions, 0 deletions