https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115630
--- Comment #2 from Saulius Gražulis <saulius.grazulis at bti dot vu.lt> --- OK, I can confirm that GNAT 15.0 from the git://gcc.gnu.org/git/gcc.git master no longer gas the bug, the finalization behaves as expected: saulius@pterodaktilis queue-finlisation/ $ PATH=$HOME/install/gnat-alire/gnat-13.2.1/bin:$PATH saulius@pterodaktilis queue-finlisation/ $ gnatclean check_queue_finalisation "./check_queue_finalisation.ali" has been deleted "./check_queue_finalisation.o" has been deleted "check_queue_finalisation" has been deleted saulius@pterodaktilis queue-finlisation/ $ gnatmake check_queue_finalisation gcc -c check_queue_finalisation.adb gnatbind -x check_queue_finalisation.ali gnatlink check_queue_finalisation.ali saulius@pterodaktilis queue-finlisation/ $ ./check_queue_finalisation | grep 'Disposing' >>> Disposing 'Thing' Address: 140729416360224 Name: 'T' Some_Stuff: Count: >>> 0 Name: 't' saulius@pterodaktilis queue-finlisation/ $ saulius@pterodaktilis queue-finlisation/ $ PATH=$HOME/install/gcc/gcc-gnu-commit-7fada36c778/bin:$PATH # Too few 'Dispose' procedures called... saulius@pterodaktilis queue-finlisation/ $ gnat --version GNAT 15.0.0 20240626 (experimental) Copyright (C) 1996-2024, Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. saulius@pterodaktilis queue-finlisation/ $ gnatclean check_queue_finalisation "./check_queue_finalisation.ali" has been deleted "./check_queue_finalisation.o" has been deleted "check_queue_finalisation" has been deleted saulius@pterodaktilis queue-finlisation/ $ gnatmake check_queue_finalisation gcc -c check_queue_finalisation.adb gnatbind -x check_queue_finalisation.ali gnatlink check_queue_finalisation.ali saulius@pterodaktilis queue-finlisation/ $ ./check_queue_finalisation | grep 'Disposing' >>> Disposing 'Thing' Address: 140735380336864 Name: 'T' Some_Stuff: Count: >>> 0 Name: 't' >>> Disposing 'Thing' Address: 140735380334504 Name: 'Y' Some_Stuff: Count: >>> 0 Name: 'y' >>> Disposing 'Thing' Address: 140735380334472 Name: 'X' Some_Stuff: Count: >>> 0 Name: 'x' >>> Disposing 'Thing' Address: 140735380336768 Name: 'U' Some_Stuff: Count: >>> 0 Name: 'u' >>> Disposing 'Thing' Address: 140735380336864 Name: 'W' Some_Stuff: Count: >>> 0 Name: 'w' # All objects Dispose'd as intended :) Sorry for the false alarm, and thanks for the rapid fixes! (Did not expect the 15.0 o have the issue fixed already :)