]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Child unit subprograms are not primitive subprograms
authorSteve Baird <baird@adacore.com>
Tue, 25 Feb 2025 21:51:40 +0000 (13:51 -0800)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 6 Jun 2025 08:37:12 +0000 (10:37 +0200)
commit5f0163fcc82e1862adef82d66ab876127751f8e3
tree6c1c4cf24cec32a68215e6316e939a8f50f62c5b
parent84fc53174e6b21de0aadc8f776a4f1e4a1e4f361
ada: Child unit subprograms are not primitive subprograms

If a package declares a type and a child unit of that package is a subprogram
with a parameter (or function result) of that type, then that subprogram is
not a primitive subprogram of that type. Previously this was handled
incorrectly in some cases, leading to incorrect analysis of overriding
indicators.

gcc/ada/ChangeLog:

* sem_util.adb (Collect_Primitive_Operations): When collecting
primitive operations, do not include child unit subprograms.
gcc/ada/sem_util.adb