Freeze_Subprogram has special handling of C++ constructor interfacing.
This is currently implicit but assuming we introduce other conventions
(e.g. Java) the current code won't hold.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-10-10 Arnaud Charlet <char...@adacore.com>
gcc/ada/
* freeze.adb (Freeze_Subprogram): Ensure constructor is a C++
constructor.
--- gcc/ada/freeze.adb
+++ gcc/ada/freeze.adb
@@ -8780,6 +8780,7 @@ package body Freeze is
-- (either in pragma CPP_Constructor or in a pragma import).
if Is_Constructor (E)
+ and then Convention (E) = Convention_CPP
and then
(No (Interface_Name (E))
or else String_Equal