Ada: Fix unresolved symbols with partial -gnatVo compilation.
Addresses unresolved symbols when using partial `-gnatVo` compilation with standard containers.
When parts of a program using standard containers were compiled with and without the -gnatVo switch (which enables validity checks), unresolved symbols could occur. This commit ensures that array comparisons are not expanded for validity checking when the component type is covered by suppression of validity checks, resolving the issue and ensuring consistent compilation.
In Details
This commit modifies exp_ch4.adb to prevent the expansion of array comparisons for validity checking in specific scenarios related to the -gnatVo switch. The issue arises when units of a program using standard containers are not uniformly compiled with -gnatVo, leading to internal confusion about which validity checks should be applied.
For Context
The Ada compiler has a -gnatVo switch that enables extra validity checks at runtime. This commit fixes a problem that occurred when some parts of a program were compiled with this switch and others weren't, especially when using standard container types (like lists or arrays). This inconsistency could lead to unresolved symbols and compilation errors. The fix ensures that validity checks are handled correctly in these mixed compilation scenarios.