public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5017] [Ada] Fix support for prefixed call with incomplete type declarations
@ 2021-11-09  9:45 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-11-09  9:45 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:ca803c3d7ba5c6626d37e615aec1748ac4199c9b

commit r12-5017-gca803c3d7ba5c6626d37e615aec1748ac4199c9b
Author: Yannick Moy <moy@adacore.com>
Date:   Mon Oct 25 12:48:22 2021 +0200

    [Ada] Fix support for prefixed call with incomplete type declarations
    
    gcc/ada/
    
            * sem_ch3.adb (Analyze_Incomplete_Type_Decl): Add the missing
            initialization.

Diff:
---
 gcc/ada/sem_ch3.adb | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 152ef83387d..ff3da385943 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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-09  9:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-09  9:45 [gcc r12-5017] [Ada] Fix support for prefixed call with incomplete type declarations Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).