aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorYannick Moy <moy@adacore.com>2021-10-25 12:48:22 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2021-11-09 09:44:46 +0000
commitca803c3d7ba5c6626d37e615aec1748ac4199c9b (patch)
tree62cd7ca83d03b3afbe3c2ce98bee14fea4a7e971 /gcc
parent9c8bb4d68240c2449c8ec9532f683cdad5bbbdbd (diff)
downloadgcc-ca803c3d7ba5c6626d37e615aec1748ac4199c9b.zip
gcc-ca803c3d7ba5c6626d37e615aec1748ac4199c9b.tar.gz
gcc-ca803c3d7ba5c6626d37e615aec1748ac4199c9b.tar.bz2
[Ada] Fix support for prefixed call with incomplete type declarations
gcc/ada/ * sem_ch3.adb (Analyze_Incomplete_Type_Decl): Add the missing initialization.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_ch3.adb9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 152ef83..ff3da38 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -3506,6 +3506,15 @@ package body Sem_Ch3 is
Set_Is_Tagged_Type (T, True);
Set_No_Tagged_Streams_Pragma (T, No_Tagged_Streams);
Make_Class_Wide_Type (T);
+ end if;
+
+ -- For tagged types, or when prefixed-call syntax is allowed for
+ -- untagged types, initialize the list of primitive operations to
+ -- an empty list.
+
+ if Tagged_Present (N)
+ or else Extensions_Allowed
+ then
Set_Direct_Primitive_Operations (T, New_Elmt_List);
end if;