aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGary Dismukes <dismukes@adacore.com>2021-05-11 14:49:46 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2021-07-06 14:46:56 +0000
commite11a24513632e2b2a3842bfd3ef226565f523778 (patch)
tree26bd333ab9b10d5819557a0db0fe6075f99538ae /gcc
parent0547a12f6ae617009ecb264674aa3ebb0c8fe462 (diff)
downloadgcc-e11a24513632e2b2a3842bfd3ef226565f523778.zip
gcc-e11a24513632e2b2a3842bfd3ef226565f523778.tar.gz
gcc-e11a24513632e2b2a3842bfd3ef226565f523778.tar.bz2
[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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_ch4.adb8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index eb1a556..1bfd222 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;