]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix bogus error on allocator in instantiation with private derived types
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 17 Jun 2024 19:22:06 +0000 (21:22 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 2 Jul 2024 13:20:34 +0000 (15:20 +0200)
commit693985f4d83c38a59967b98a9c700aaccd07e245
tree5dcd26c28d6fea248ba6502a70fb8d7eab465e01
parent9fbf6517c73981c2050fe5b0260ca796217d43d5
ada: Fix bogus error on allocator in instantiation with private derived types

The problem is that the call to Convert_View made from Make_Init_Call does
nothing because the Etype is not set on the second argument.

gcc/ada/

* exp_ch7.adb (Convert_View): Add third parameter Typ and use it if
the second parameter does not have an Etype.
(Make_Adjust_Call): Remove obsolete setting of Etype and pass Typ in
call to Convert_View.
(Make_Final_Call): Likewise.
(Make_Init_Call): Pass Typ in call to Convert_View.
gcc/ada/exp_ch7.adb