8sa1-gcc/gcc/testsuite/gnat.dg/cpp_constructor_useit.ads
Javier Miranda 07c91770f8 [Ada] Spurious error on non-default C++ constructor
The frontend reports spurious errors on C++ non-default constructors
that have formals whose type is an access to subprogram.

2019-07-04  Javier Miranda  <miranda@adacore.com>

gcc/ada/

	* exp_tss.adb (Init_Proc): Adding missing support for access to
	subprograms and access to protected subprograms of non-default
	C++ constructors.

gcc/testsuite/

	* gnat.dg/cpp_constructor.adb, gnat.dg/cpp_constructor_fp.ads,
	gnat.dg/cpp_constructor_useit.ads: New testcase.

From-SVN: r273072
2019-07-04 08:07:24 +00:00

9 lines
222 B
Ada

with Interfaces.C; use Interfaces.C;
package Cpp_Constructor_Useit is
function My_Fn (Val : int) return int
with Convention => Cpp;
function My_Fn (Val : int) return int is (Val + 1);
end Cpp_Constructor_Useit;