https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124016
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Eric Botcazou <[email protected]>: https://gcc.gnu.org/g:ec93f25c4b0fa3d17928d576157cdfac9985459e commit r16-8051-gec93f25c4b0fa3d17928d576157cdfac9985459e Author: Steve Baird <[email protected]> Date: Thu Mar 12 18:18:36 2026 +0100 Ada: Fix Program_Error raised in a Bounded_Indefinite_Holders instance If Ada.Containers.Bounded_Indefinite_Holders is instantiated with an Element_Type that requires finalization, the declaration of a Holder object with an explicit initial value may incorrectly raise Program_Error during its elaboration. gcc/ada/ PR ada/124016 * libgnat/a-cbinho.adb (Create_Subpool): Handle the case where the type Holder_Subpool has nontrivial finalization. Declare the local variable Subpool with its Import aspect specified (to avoid unwanted finalization), and make corresponding changes in order to initialize that variable. * libgnat/s-stposu.ads (_Adjust_Clone): New procedure. * libgnat/s-stposu.adb (_Adjust_Clone): New body.
