ada: Incorrect constant folding in postcondition involving 'Old
The following patch fixes an issue in the compiler whereby certain flavors of
access comparisons may be incorrectly constant-folded out of contract
expressions - notably in postcondition expressions featuring a reference to
'Old.
gcc/ada/
* checks.adb (Install_Null_Excluding_Check): Avoid non-null
optimizations when assertions are enabled.