public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2069] [Ada] Regression on overloaded prefixed calls related to prefixed-call extension
@ 2021-07-06 14:49 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-07-06 14:49 UTC (permalink / raw)
  To: gcc-cvs

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

commit r12-2069-ge11a24513632e2b2a3842bfd3ef226565f523778
Author: Gary Dismukes <dismukes@adacore.com>
Date:   Tue May 11 14:49:46 2021 -0400

    [Ada] Regression on overloaded prefixed calls related to prefixed-call extension
    
    gcc/ada/
    
            * sem_ch4.adb (Try_One_Prefix_Interpretation): Augment test of
            "not Extensions_Allowed" with test for absence of Obj_Type's
            primitive operations Elist, as an additional condition for early
            return from this procedure.

Diff:
---
 gcc/ada/sem_ch4.adb | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index eb1a556dd5c..1bfd222301e 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -9558,9 +9558,13 @@ package body Sem_Ch4 is
 
          --  Extension feature: Calls with prefixed views are also supported
          --  for untagged types, so skip the early return when extensions are
-         --  enabled.
+         --  enabled, unless the type doesn't have a primitive operations list
+         --  (such as in the case of predefined types).
 
-         if (not Is_Tagged_Type (Obj_Type) and then not Extensions_Allowed)
+         if (not Is_Tagged_Type (Obj_Type)
+              and then
+                (not Extensions_Allowed
+                  or else not Present (Primitive_Operations (Obj_Type))))
            or else Is_Incomplete_Type (Obj_Type)
          then
             Obj_Type := Prev_Obj_Type;


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

only message in thread, other threads:[~2021-07-06 14:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 14:49 [gcc r12-2069] [Ada] Regression on overloaded prefixed calls related to prefixed-call extension 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).