exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take care of unchecked...
authorPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 9 Oct 2017 18:23:07 +0000 (18:23 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 9 Oct 2017 18:23:07 +0000 (18:23 +0000)
commit5d57846b76a90d2a1f12b519afdb636851a15e90
tree38ff92e8ad71a71e6fd37742318ecea0e136146a
parenta1df65216abc657e2bc941ede69eeb225e7bd224
exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take care of unchecked...

gcc/ada/

2017-10-09  Bob Duff  <duff@adacore.com>

* exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take
care of unchecked conversions in addition to regular conversions. This
takes care of a case where a type is derived from a private untagged
type that is completed by a tagged controlled type.

2017-10-09  Ed Schonberg  <schonberg@adacore.com>

* exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When
rewriting a class-wide condition, handle properly the case where the
controlling argument of the operation to which the condition applies is
an access to a tagged type, and the condition includes a dispatching
call with an implicit dereference.

gcc/testsuite/

2017-10-09  Ed Schonberg  <schonberg@adacore.com>

* gnat.dg/class_wide4.adb, gnat.dg/class_wide4_pkg.ads,
gnat.dg/class_wide4_pkg2.ads: New testcase.

From-SVN: r253554
gcc/ada/ChangeLog
gcc/ada/exp_ch6.adb
gcc/ada/exp_disp.adb
gcc/testsuite/gnat.dg/class_wide4.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/class_wide4_pkg.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/class_wide4_pkg2.ads [new file with mode: 0644]