projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d12b8e9
)
[Ada] Improve building of untagged equality
author
Piotr Trojanek
<trojanek@adacore.com>
Tue, 8 Mar 2022 16:37:29 +0000
(17:37 +0100)
committer
Pierre-Marie de Rodat
<derodat@adacore.com>
Mon, 16 May 2022 08:42:03 +0000
(08:42 +0000)
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.
gcc/ada/exp_ch3.adb
patch
|
blob
|
history
diff --git
a/gcc/ada/exp_ch3.adb
b/gcc/ada/exp_ch3.adb
index
018f88b
..
dfbbc62
100644
(file)
--- 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);