There is no need to explicitly guard against an empty list where the
subsequent iteration with First/Next/Present works fine.

Cleanup related to expansion of aggregates in GNATprove mode; behaviour
is unaffected.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

        * exp_aggr.adb (Component_OK_For_Backend): Remove redundant
        guard.
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -8547,10 +8547,6 @@ package body Exp_Aggr is
          Expr_Q : Node_Id;
 
       begin
-         if No (Comps) then
-            return True;
-         end if;
-
          C := First (Comps);
          while Present (C) loop
 


Reply via email to