]> 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)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 22 Jul 2025 10:08:40 +0000 (12:08 +0200)
commite28f90fcc8d8eafcae7fe5bd3ea18cfc194e7d6b
treebc0c44feb1ba8dd1eb65050b961dcb43a6e2e337
parent9023bcd0d68c1ba7faebc9edb6db34537b2a7966
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