[Ada] Crash in C++ constructor without external and link name
authorJavier Miranda <miranda@adacore.com>
Mon, 22 Jul 2019 13:56:36 +0000 (13:56 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 22 Jul 2019 13:56:36 +0000 (13:56 +0000)
commit2fdc20b65c2f3409591aeea810001a29ff1d6739
tree3d01bf6710398160325173c03e27686536a77d66
parent0af66bdce078d022e19dae1c83dfa06f7f622648
[Ada] Crash in C++ constructor without external and link name

The compiler blows up processing the declaration of a tagged type
variable that has a C++ constructor without external or link name. After
this patch the frontend reports an error.

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

gcc/ada/

* freeze.adb (Freeze_Subprogram): Check that C++ constructors
must have external or link name.

gcc/testsuite/

* gnat.dg/cpp_constructor2.adb: New testcase.

From-SVN: r273670
gcc/ada/ChangeLog
gcc/ada/freeze.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/cpp_constructor2.adb [new file with mode: 0644]