ada: Remove side effects depending on the context of subtype declaration
commitda75ce88bde06bfcef2d454054f43ed430d96b00
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 4 Dec 2023 16:41:27 +0000 (4 17:41 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 9 Jan 2024 13:13:31 +0000 (9 14:13 +0100)
treef80d37d1ebe8a8734e6267712d8aba1f411e2c0d
parent9afbf898ce89f6bcb314ddf03da20abdf0ac79cd
ada: Remove side effects depending on the context of subtype declaration

In GNATprove mode the removal of side effects is only needed in certain
syntactic contexts, which include subtype declarations. Now this removal
is limited to genuine subtype declarations and not to itypes coming from
expressions where side effects are not expected.

gcc/ada/

* exp_util.adb (Possible_Side_Effect_In_SPARK): Refine handling of
itype declarations.
gcc/ada/exp_util.adb