aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJavier Miranda <miranda@adacore.com>2020-05-26 14:54:15 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2020-07-10 05:16:19 -0400
commit4e91f87c3e7b76af8a73b52498f76aa3aea50b69 (patch)
treed995dbcd77d19ed246110f7cfc7116da6dd42112 /gcc
parent5f43e7893006c3cc78d196ec1e7579216c177161 (diff)
downloadgcc-4e91f87c3e7b76af8a73b52498f76aa3aea50b69.zip
gcc-4e91f87c3e7b76af8a73b52498f76aa3aea50b69.tar.gz
gcc-4e91f87c3e7b76af8a73b52498f76aa3aea50b69.tar.bz2
[Ada] Spurious error in generic dispatching constructor call
gcc/ada/ * exp_ch6.adb (Make_Build_In_Place_Iface_Call_In_Allocator): Build the internal anonymous access type using as a reference the designated type imposed by the context (instead of using the return type of the called function).
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/exp_ch6.adb3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index 776ff49..329f3b5 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -9709,7 +9709,8 @@ package body Exp_Ch6 is
-- declaration.
Anon_Type := Create_Itype (E_Anonymous_Access_Type, Function_Call);
- Set_Directly_Designated_Type (Anon_Type, Etype (BIP_Func_Call));
+ Set_Directly_Designated_Type (Anon_Type,
+ Designated_Type (Etype (Allocator)));
Set_Etype (Anon_Type, Anon_Type);
Build_Class_Wide_Master (Anon_Type);