[Ada] Spurious error on incomplete tagged formal parameter
authorJustin Squirek <squirek@adacore.com>
Thu, 4 Jul 2019 08:06:40 +0000 (08:06 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 4 Jul 2019 08:06:40 +0000 (08:06 +0000)
commite3a79ce3c18fc6e1df6176e506095c7f8bac30ab
treeab2de7b37038c6ab18d0fd81e13bb870fe02a75f
parentbdbb2a405541671bb427f6ff2f463a98c62b0a46
[Ada] Spurious error on incomplete tagged formal parameter

This patch fixes an issue whereby a check for competing controlling
formals led to a spurious dispatching error due to an incomplete type
being used within a subprogram specification.

2019-07-04  Justin Squirek  <squirek@adacore.com>

gcc/ada/

* sem_disp.adb (Check_Controlling_Formals): Obtain the full view
before type comparison.

gcc/testsuite/

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

From-SVN: r273063
gcc/ada/ChangeLog
gcc/ada/sem_disp.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/tagged2.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/tagged2.ads [new file with mode: 0644]