]> git.ipfire.org Git - thirdparty/gcc.git/commit
Ada: Fix assertion failure on child generic package
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 27 Oct 2025 18:51:11 +0000 (19:51 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Mon, 27 Oct 2025 20:41:34 +0000 (21:41 +0100)
commit76943639ddd861dce3886d1def2a353ccfcdd585
tree7a0c78560a40e856ebffab4f5c24e772d32d4179
parent935bebb2ce2f9245364cf77bd6804030890f5b62
Ada: Fix assertion failure on child generic package

That's an oversight in Declare_Inherited_Private_Subprograms, which does
not deal with formal types specially as it should per RM 3.2.3(7.d/2).

gcc/ada/
PR ada/29958
* sem_ch7.adb (Declare_Inherited_Private_Subprograms): Deal with
formal types specially.

gcc/testsuite/
* gnat.dg/specs/private3-child.ads: New test.
* gnat.dg/specs/private3.ads: New helper.
gcc/ada/sem_ch7.adb
gcc/testsuite/gnat.dg/specs/private3-child.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/specs/private3.ads [new file with mode: 0644]