]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Minor fix in handling of inherited Pre/Post'Class aspect
authorMartin Clochard <clochard@adacore.com>
Tue, 29 Apr 2025 09:36:19 +0000 (11:36 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 1 Jul 2025 08:29:38 +0000 (10:29 +0200)
commit709bf32c15dc104827d792897dc85408fabb2557
treea07de4332bc95fce120bdff1bfb39a3f29e92a34
parentd575c1f498d48d425739f824400c5373382abe28
ada: Minor fix in handling of inherited Pre/Post'Class aspect

Mapping of calls to primitive functions in Pre/Post'Class aspects
inherited by derived types was only testing against controlling formals
of the parent subprogram. This lead to missing some calls, because formals
could be rewritten to that of the derived subprogram before the test
happens.

gcc/ada/ChangeLog:

* exp_util.adb (Is_Controlling_Formal_Ref): test scope against
derived subprogram as well.
gcc/ada/exp_util.adb