]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix crash on legality check for initialization of implicit constructor
authorDenis Mazzucato <mazzucato@adacore.com>
Thu, 18 Dec 2025 12:34:18 +0000 (13:34 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 9 Jan 2026 10:57:22 +0000 (11:57 +0100)
commit197dfdca778234286dfcb8b5cb91af93e24e4341
tree55920a8d8d0d0155dd8e51b3fc1e904f61364c0e
parent8555ca0b832e8136858e27633dad882d8dfd17cb
ada: Fix crash on legality check for initialization of implicit constructor

This patch fixes a crash occurring during the legality check of the Initialize
aspect when the constructor is implicitly created by the compiler, e.g., the
default copy constructor. In such case, Corresponding_Spec is not available, the
Specification field must be used instead.

gcc/ada/ChangeLog:

* sem_ch13.adb (Check_Constructor_Initialization_Expression): The first
parameter of an implicit constructor comes from Specification, not
Corresponding_Spec.
gcc/ada/sem_ch13.adb