Avoid transient scope creation under GNATProve mode.
The Ada compiler now avoids creating transient scopes under GNATProve mode, fixing a recent regression.
A regression introduced a transient scope creation under GNATProve mode in the Ada compiler. This commit fixes the issue by preventing the creation of a transient scope in sem_res.adb (Resolve_Declare_Expression) when compiling code under GNATProve mode, hence resolving the regression.
In Details
This commit modifies sem_res.adb (Resolve_Declare_Expression) to prevent the creation of a transient scope when under GNATProve mode. This fixes a regression introduced recently.
For Context
GNATProve is a formal verification tool used with the Ada programming language to prove the absence of certain run-time errors. Scopes in programming define the region where a variable or entity is valid. This commit fixes a recent regression in the Ada compiler related to how scopes are handled when using GNATProve.