]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: exp_util.adb: prevent infinite loop in case of broken code
authorGhjuvan Lacambre <lacambre@adacore.com>
Wed, 2 Jul 2025 07:11:03 +0000 (09:11 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 22 Jul 2025 08:35:08 +0000 (10:35 +0200)
commit83219c97fabc1c0a8e0c42ad3d023706b8132827
tree3713c05545abdfb075a3eb960c55cb4fb11fe7a4
parent84468c33ffc2ce99678623693a98fcbdddf4ff47
ada: exp_util.adb: prevent infinite loop in case of broken code

A recent commit modified exp_util.adb in order to fix the selection of
Finalize subprograms in the case of untagged objects.
This introduced regressions for GNATSAS in fixedbugs by causing
GNAT2SCIL to loop over the same type over and over in case of broken
code.
We fix this by simply checking that the loop is making progress, and if
it doesn't, assume that we're done.

gcc/ada/ChangeLog:

* exp_util.adb (Finalize_Address): Prevent infinite loop
gcc/ada/exp_util.adb