]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Exception-raising loop incorrectly eliminated
authorSteve Baird <baird@adacore.com>
Thu, 30 Jan 2025 21:28:50 +0000 (13:28 -0800)
committerEric Botcazou <ebotcazou@adacore.com>
Thu, 5 Jun 2025 13:39:45 +0000 (15:39 +0200)
commit48a5910dde566180a0a0878651a78ccece89be45
tree5e83729db45ac6625d8881da539b525fb3a1e058
parent257a8dc92efbc5f523d388da10d63bf126af2aa3
ada: Exception-raising loop incorrectly eliminated

If the body of a loop includes a raise statement then the loop should not be
considered to be free of side-effects and therefore eligible for elimination
by the compiler.

gcc/ada/ChangeLog:

* sem_util.adb
(Side_Effect_Free_Statements): Return False if the statement list
includes an explicit (i.e. Comes_From_Source) raise statement.
gcc/ada/sem_util.adb