public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-479] [Ada] Improve building of untagged equality
@ 2022-05-16  8:43 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-05-16  8:43 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:90fadb50df34d11348ec67a1cbbaeac8a28c2da3

commit r13-479-g90fadb50df34d11348ec67a1cbbaeac8a28c2da3
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Tue Mar 8 17:37:29 2022 +0100

    [Ada] Improve building of untagged equality
    
    When checking components of a record type for their own user-defined
    equality function it is enough to find just one such a component.
    
    Cleanup related to handling of user-defined equality in GNATprove.
    
    gcc/ada/
    
            * exp_ch3.adb (Build_Untagged_Equality): Exit early when the
            outcome of a loop is already known.

Diff:
---
 gcc/ada/exp_ch3.adb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
index 018f88b1752..dfbbc62b4d6 100644
--- a/gcc/ada/exp_ch3.adb
+++ b/gcc/ada/exp_ch3.adb
@@ -4541,6 +4541,7 @@ package body Exp_Ch3 is
            and then Present (User_Defined_Eq (Etype (Comp)))
          then
             Build_Eq := True;
+            exit;
          end if;
 
          Next_Component (Comp);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-16  8:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-16  8:43 [gcc r13-479] [Ada] Improve building of untagged equality Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).