diff options
author | Gary Dismukes <dismukes@adacore.com> | 2021-05-21 13:59:30 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-07-07 16:23:19 +0000 |
commit | 2c03e97c5a50acc10fcb3545385fac4c1a9fa543 (patch) | |
tree | 56285beb022da63fc033415b02b84cd0e8d9a9cc /gcc/ada/einfo-utils.adb | |
parent | cce46226b0bb33c688398f861c70dbb06c3e7bda (diff) | |
download | gcc-2c03e97c5a50acc10fcb3545385fac4c1a9fa543.zip gcc-2c03e97c5a50acc10fcb3545385fac4c1a9fa543.tar.gz gcc-2c03e97c5a50acc10fcb3545385fac4c1a9fa543.tar.bz2 |
[Ada] Assertion errors on concurrent types with -gnatc and extensions enabled
gcc/ada/
* einfo-utils.adb (Primitive_Operations): Default to returning
Direct_Primitive_Operations in the case of concurrent types
(when Corresponding_Record_Type not present).
* sem_ch9.adb (Analyze_Protected_Type_Declaration): Initialize
Direct_Primitive_Operations to an empty element list.
(Analyze_Task_Type_Declaration): Initialize
Direct_Primitive_Operations to an empty element list.
Diffstat (limited to 'gcc/ada/einfo-utils.adb')
-rw-r--r-- | gcc/ada/einfo-utils.adb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/ada/einfo-utils.adb b/gcc/ada/einfo-utils.adb index 22143d6..b2d8a84 100644 --- a/gcc/ada/einfo-utils.adb +++ b/gcc/ada/einfo-utils.adb @@ -2493,15 +2493,15 @@ package body Einfo.Utils is return Direct_Primitive_Operations (Corresponding_Record_Type (Id)); - -- If expansion is disabled the corresponding record type is absent, - -- but if the type has ancestors it may have primitive operations. - - elsif Is_Tagged_Type (Id) then - return Direct_Primitive_Operations (Id); + -- When expansion is disabled, the corresponding record type is + -- absent, but if this is a tagged type with ancestors, or if the + -- extension of prefixed calls for untagged types is enabled, then + -- it may have associated primitive operations. else - return No_Elist; + return Direct_Primitive_Operations (Id); end if; + else return Direct_Primitive_Operations (Id); end if; |