]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix unresolved symbols with partial -gnatVo compilation
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 3 Mar 2026 10:35:36 +0000 (11:35 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 28 May 2026 08:52:50 +0000 (10:52 +0200)
This happens when the units of a program using the standard containers are
not uniformly compiled with the -gnatVo switch.  This is the fallout of an
internal confusion as to what validity checks must be applied to.

gcc/ada/ChangeLog:

* exp_ch4.adb (Expand_N_Op_Eq): Do not expand an array comparison
for validity checking purposes when the component type is covered
by the suppression of validity checks.

gcc/ada/exp_ch4.adb

index 533e2f0d7542ddcee1f7599556d1b9694f7312a6..9a77084f524178afb3c31afeaae17cbc148e9e20 100644 (file)
@@ -8582,6 +8582,8 @@ package body Exp_Ch4 is
 
          if Validity_Check_Operands
            and then not Is_Known_Valid (Component_Type (Typl))
+           and then not
+             Is_Check_Suppressed (Component_Type (Typl), Validity_Check)
          then
             declare
                Save_Force_Validity_Checks : constant Boolean :=