aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-04-28 15:55:38 +0200
committerMarc Poulhiès <poulhies@adacore.com>2023-06-13 09:31:45 +0200
commitd0ffa8d5155db105ce7b6e5b76c489c0fff1d090 (patch)
tree811d5844320e4227e14b72c644cb639566afd8bb /gcc
parent659aeb219401210220a521eccd6ad95620841245 (diff)
downloadgcc-d0ffa8d5155db105ce7b6e5b76c489c0fff1d090.zip
gcc-d0ffa8d5155db105ce7b6e5b76c489c0fff1d090.tar.gz
gcc-d0ffa8d5155db105ce7b6e5b76c489c0fff1d090.tar.bz2
ada: Fix another case of missing Has_Private_View flag
It occurs for the case of a function call first parsed as an identifier. gcc/ada/ * sem_ch12.adb (Save_References_In_Identifier): In the case where the identifier has been turned into a function call by analysis, call Set_Global_Type on the entity if it is global.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_ch12.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 0ef894e..a38ab28 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -16526,7 +16526,7 @@ package body Sem_Ch12 is
E := Entity (Name (N2));
if Present (E) and then Is_Global (E) then
- Set_Etype (N, Etype (N2));
+ Set_Global_Type (N, N2);
else
Set_Associated_Node (N, Empty);
Set_Etype (N, Empty);