summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViljar Indus <indus@adacore.com>2025-01-16 21:40:54 +0200
committerMarc Poulhiès <dkm@gcc.gnu.org>2025-11-21 09:29:36 +0100
commitefb51d68abc06a9f5815318343164c8d2a78863c (patch)
tree25f2a0c5933297434001a7070e1267cc73a5bc31
parentf9c01c47f8e5451e41a5df78f044d7b1e7b3d5d6 (diff)
ada: Ensure a limited type is marking the packing as used
gcc/ada/ChangeLog: * sem_ch4.adb (Analyze_Call): ensure we generate a reference to the non limited view of the return type to avoid scenarios where the with-ed unit is not considered referenced.
-rw-r--r--gcc/ada/sem_ch4.adb1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index c16e0453ec1..a735637d0e3 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -1626,6 +1626,7 @@ package body Sem_Ch4 is
or else Is_Thunk (Current_Scope))
then
Set_Etype (N, Non_Limited_View (Etype (N)));
+ Generate_Reference (Scope (Etype (N)), N);
-- If there is no completion for the type, this may be because
-- there is only a limited view of it and there is nothing in