[gcc r16-1141] ada: Mark the types of operator arguments as used
Marc Poulhies
dkm@gcc.gnu.org
Thu Jun 5 08:20:54 GMT 2025
https://gcc.gnu.org/g:f60377fd66e5d10d58ee667230a3e1f4f6f150e2
commit r16-1141-gf60377fd66e5d10d58ee667230a3e1f4f6f150e2
Author: Viljar Indus <indus@adacore.com>
Date: Thu Jan 9 12:37:56 2025 +0200
ada: Mark the types of operator arguments as used
When a use type clause is used then it makes the type and
all of its operators use visible in the context. When analyzing
whether a use type clause is effective we should additionally
mark the types of an overloaded operator as cases where the
use type clause is effective.
gcc/ada/ChangeLog:
* sem_ch8.adb (Mark_Use_Type): Additionally mark the types
of the parameters and return values as used when analyzing an
operator.
Diff:
---
gcc/ada/sem_ch8.adb | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index 0a9ef419db78..6fb9a9a1f5a7 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -9504,6 +9504,11 @@ package body Sem_Ch8 is
and then Present (Scope (Entity (E)))
then
Mark_Use_Package (Scope (Entity (E)));
+
+ -- Additionally mark the types of the formals and the return
+ -- types as used when dealing with an overloaded operator.
+
+ Mark_Parameters (Entity (E));
end if;
Curr := Current_Use_Clause (Base);
More information about the Gcc-cvs
mailing list