[Bug ada/124607] [13/14/15/16 regression] crash on instantiation in separate package body
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 23 21:06:21 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124607
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Eric Botcazou <ebotcazou@gcc.gnu.org>:
https://gcc.gnu.org/g:6513196ea1135e9d74024c12697fb97978b49350
commit r16-8259-g6513196ea1135e9d74024c12697fb97978b49350
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Mon Mar 23 22:01:52 2026 +0100
Ada: Fix crash on instantiation in separate package body
This is an old regression present on all active branches for a quite
unusual
setup where a generic package is declared and instantiated in a subunit,
and
which comes from a thinko in the Has_Body.Find_Body routine of Sem_Elab.
gcc/ada/
PR ada/124607
* sem_elab.adb (Has_Body.Find_Body): Fix thinko.
gcc/testsuite/
* gnat.dg/generic_inst20.ads, gnat.dg/generic_inst20.adb: New test.
* gnat.dg/generic_inst20-sub.adb: New helper.
More information about the Gcc-bugs
mailing list