]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Crash initializing component of private record type
authorJavier Miranda <miranda@adacore.com>
Fri, 17 Nov 2023 17:08:56 +0000 (17:08 +0000)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 30 Nov 2023 10:12:47 +0000 (11:12 +0100)
commit44eddd691e54c4128904b7ea35bc05f8e3741877
tree80a566ee9f84aafe2f31d8a64619b5a62b449aee
parentcff5ecd412493784d88a963da248ca9a1b0a9f64
ada: Crash initializing component of private record type

The compiler may crash processing the full type declaration of a
private record type that initializes a component with a call to
a function instantiated in the private part of the package.

gcc/ada/

* freeze.adb (Declared_In_Expanded_Body): New subprogram.
(In_Expanded_Body): Minor code cleanup.
(Freeze_Expression): Code cleanup plus factorize in a new function
the code that identifies entities declared in the body of expander
generated subprograms, since such case must be checked also for
other node kinds when climbing the tree to locate the place to
insert the freezing node.
gcc/ada/freeze.adb